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§
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".