Trait shuttle_service::Factory
source · [−]pub trait Factory: Send + Sync {
fn get_sql_connection_string<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Factories can be used to request the provisioning of additional resources (like databases).
An instance of factory is passed by the deployer as an argument to Service::build in the initial phase of deployment.
Also see the declare_service! macro.
Required methods
Declare that the Service requires a postgres database.
Returns the connection string to the provisioned database.