Skip to main content

DeployBackend

Trait DeployBackend 

Source
pub trait DeployBackend: Send + Sync {
    // Required methods
    fn deploy<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        project_name: &'life1 str,
        template: &'life2 AgentTemplate,
        extra_env: &'life3 HashMap<String, String>,
    ) -> Pin<Box<dyn Future<Output = Result<DeploymentResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn status<'life0, 'life1, 'async_trait>(
        &'life0 self,
        project_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, DeployedService>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn destroy<'life0, 'life1, 'async_trait>(
        &'life0 self,
        project_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn restart<'life0, 'life1, 'async_trait>(
        &'life0 self,
        project_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn scale<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        project_id: &'life1 str,
        service_name: &'life2 str,
        replicas: u32,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Trait for cloud deployment backends.

Implementations handle the specifics of provisioning, monitoring, and tearing down agent stacks on different cloud providers.

Required Methods§

Source

fn deploy<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, project_name: &'life1 str, template: &'life2 AgentTemplate, extra_env: &'life3 HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<DeploymentResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Deploy an agent template to the cloud target.

Source

fn status<'life0, 'life1, 'async_trait>( &'life0 self, project_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, DeployedService>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get the deployment status for all services in a project.

Source

fn destroy<'life0, 'life1, 'async_trait>( &'life0 self, project_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Destroy a project and all its services.

Source

fn restart<'life0, 'life1, 'async_trait>( &'life0 self, project_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Restart all services in a project.

Source

fn scale<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, project_id: &'life1 str, service_name: &'life2 str, replicas: u32, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Scale a specific service to the given number of replicas.

Implementors§