Skip to main content

WorkerStatusProvider

Trait WorkerStatusProvider 

Source
pub trait WorkerStatusProvider:
    Send
    + Sync
    + Debug {
    // Required methods
    fn snapshot_containers<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Vec<WorkerContainerStatus>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn snapshot_resources<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = WorkerResourceUsage> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Status snapshot provider for the worker. The agent’s ServiceManager implements this so the worker client can report current container state

  • resource usage on each heartbeat tick.

Required Methods§

Source

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

Snapshot the worker’s current container states for ReportStatus.

Source

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

Snapshot the worker’s current resource usage.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§