ControlPlane

Trait ControlPlane 

Source
pub trait ControlPlane: Send + Sync {
    // Required methods
    fn is_cancelled<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn progress<'life0, 'async_trait>(
        &'life0 self,
        value: Value,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn log_event<'life0, 'async_trait>(
        &'life0 self,
        fields: Value,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Control-plane interface for a running task.

Required Methods§

Source

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

Returns true if the task has been cancelled.

Source

fn progress<'life0, 'async_trait>( &'life0 self, value: Value, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Report progress to the engine; opaque JSON accepted to avoid coupling.

Source

fn log_event<'life0, 'async_trait>( &'life0 self, fields: Value, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Log an event with fields to be attached to heartbeats.

Implementors§