Skip to main content

StateStore

Trait StateStore 

Source
pub trait StateStore: Send + Sync {
    // Required methods
    fn record_queued<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        job: &'life1 Job,
        pipeline_id: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn record_running<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        job: &'life1 Job,
        pipeline_id: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn record_completed<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        job_id: &'life1 str,
        pipeline_id: &'life2 str,
        status: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn recover_incomplete<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<JobStateRecord>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Persistence trait for the orchestrator job lifecycle.

Required Methods§

Source

fn record_queued<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, job: &'life1 Job, pipeline_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Record that a job has been queued for a pipeline.

Source

fn record_running<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, job: &'life1 Job, pipeline_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Record that a job has started executing.

Source

fn record_completed<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, job_id: &'life1 str, pipeline_id: &'life2 str, status: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Record that a job has completed (status = “success” or “failure”).

Source

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

Return all jobs that were not completed, for crash recovery.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§