Skip to main content

WorkerPoolClient

Trait WorkerPoolClient 

Source
pub trait WorkerPoolClient: Send + Sync {
    // Required methods
    fn submit<'life0, 'async_trait>(
        &'life0 self,
        request: WorkerRequest,
    ) -> Pin<Box<dyn Future<Output = Result<WorkerResponse, WorkerPoolError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn health_snapshot<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Vec<WorkerHealth>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Adapter trait for worker pools used by runtime integrations.

Required Methods§

Source

fn submit<'life0, 'async_trait>( &'life0 self, request: WorkerRequest, ) -> Pin<Box<dyn Future<Output = Result<WorkerResponse, WorkerPoolError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Submits one request to the underlying worker pool.

Source

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

Returns a snapshot of worker health state.

Implementors§