pub trait Factory: Send + Sync {
    fn get_db_connection_string<'life0, 'async_trait>(
        &'life0 mut self,
        db_type: Type
    ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn get_secrets<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<BTreeMap<String, String>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn get_service_name(&self) -> ServiceName; }
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 ResourceBuilder::build in the initial phase of deployment.

Also see the main macro.

Required Methods

Declare that the Service requires a database.

Returns the connection string to the provisioned database.

Get all the secrets for a service

Get the name for the service being deployed

Implementors