pub trait Factory: Send + Sync {
    // Required methods
    fn get_db_connection<'life0, 'async_trait>(
        &'life0 mut self,
        db_type: Type
    ) -> Pin<Box<dyn Future<Output = Result<DatabaseInfo, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn get_container<'life0, 'async_trait>(
        &'life0 mut self,
        req: ContainerRequest
    ) -> Pin<Box<dyn Future<Output = Result<ContainerResponse, 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, Secret<String>>, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn get_metadata(&self) -> DeploymentMetadata;
}
Expand description

An interface for the provisioner used in ResourceBuilder::output.

Required Methods§

source

fn get_db_connection<'life0, 'async_trait>( &'life0 mut self, db_type: Type ) -> Pin<Box<dyn Future<Output = Result<DatabaseInfo, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Provision a Shuttle database and get the connection information

source

fn get_container<'life0, 'async_trait>( &'life0 mut self, req: ContainerRequest ) -> Pin<Box<dyn Future<Output = Result<ContainerResponse, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Start a Docker container. Only used in local runs.

source

fn get_secrets<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<BTreeMap<String, Secret<String>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Get the secrets associated with this service

source

fn get_metadata(&self) -> DeploymentMetadata

Get the metadata for this deployment

Implementors§