Skip to main content

Manager

Trait Manager 

Source
pub trait Manager: Send + Sync {
    // Required methods
    fn deploy<'life0, 'async_trait>(
        &'life0 self,
        request: DeployRequest,
    ) -> Pin<Box<dyn Future<Output = AppResult<DeployResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stop<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn remove<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn restart<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn status<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = AppResult<WorkloadStatus>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn wait<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = AppResult<WaitResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn logs<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
        options: LogOptions,
    ) -> Pin<Box<dyn Future<Output = AppResult<Vec<String>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list<'life0, 'async_trait>(
        &'life0 self,
        filter: ListFilter,
    ) -> Pin<Box<dyn Future<Output = AppResult<Vec<WorkloadInfo>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn health_check<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Core workload lifecycle operations. All backends implement this trait.

Every method takes an explicit workload identifier and is cancellation-aware through the caller’s async runtime; backends must apply their own timeouts to remote calls.

Required Methods§

Source

fn deploy<'life0, 'async_trait>( &'life0 self, request: DeployRequest, ) -> Pin<Box<dyn Future<Output = AppResult<DeployResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create and start a workload.

Source

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

Gracefully stop a running workload.

Source

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

Remove a stopped workload and clean up its resources.

Source

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

Stop and restart a workload.

Source

fn status<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AppResult<WorkloadStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return the current status of a workload.

Source

fn wait<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AppResult<WaitResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Block until the workload exits, returning its exit status.

Source

fn logs<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, options: LogOptions, ) -> Pin<Box<dyn Future<Output = AppResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return buffered log lines for a workload.

Source

fn list<'life0, 'async_trait>( &'life0 self, filter: ListFilter, ) -> Pin<Box<dyn Future<Output = AppResult<Vec<WorkloadInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List workloads matching filter.

Source

fn health_check<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = AppResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Verify the backend runtime is reachable and healthy.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§