Skip to main content

StateBackendRunner

Trait StateBackendRunner 

Source
pub trait StateBackendRunner: Send + Sync {
    // Required methods
    fn store_runner_context<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: &'life1 StoredRunnerContext,
    ) -> Pin<Box<dyn Future<Output = RustvelloResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_runner_context<'life0, 'life1, 'async_trait>(
        &'life0 self,
        runner_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = RustvelloResult<Option<StoredRunnerContext>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_runner_contexts_by_parent<'life0, 'life1, 'async_trait>(
        &'life0 self,
        parent_runner_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<StoredRunnerContext>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_invocation_ids_by_runner<'life0, 'life1, 'async_trait>(
        &'life0 self,
        runner_id: &'life1 str,
        limit: usize,
        offset: usize,
    ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<InvocationId>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn count_invocations_by_runner<'life0, 'life1, 'async_trait>(
        &'life0 self,
        runner_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = RustvelloResult<usize>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_history_in_timerange<'life0, 'async_trait>(
        &'life0 self,
        start: DateTime<Utc>,
        end: DateTime<Utc>,
        limit: usize,
        offset: usize,
    ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<InvocationHistory>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_matching_runner_contexts<'life0, 'life1, 'async_trait>(
        &'life0 self,
        partial_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<StoredRunnerContext>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Runner context storage, analytics, and time-range queries.

Required Methods§

Source

fn store_runner_context<'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 StoredRunnerContext, ) -> Pin<Box<dyn Future<Output = RustvelloResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Store a runner’s execution context for monitoring.

Source

fn get_runner_context<'life0, 'life1, 'async_trait>( &'life0 self, runner_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Option<StoredRunnerContext>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Retrieve a runner’s execution context.

Source

fn get_runner_contexts_by_parent<'life0, 'life1, 'async_trait>( &'life0 self, parent_runner_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<StoredRunnerContext>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get all runner contexts whose parent_runner_id matches the given runner.

Source

fn get_invocation_ids_by_runner<'life0, 'life1, 'async_trait>( &'life0 self, runner_id: &'life1 str, limit: usize, offset: usize, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<InvocationId>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get invocation IDs that were processed by a specific runner (by runner_id in history).

Returns paginated results. limit of 0 means no limit.

Source

fn count_invocations_by_runner<'life0, 'life1, 'async_trait>( &'life0 self, runner_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = RustvelloResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count invocations that were processed by a specific runner.

Source

fn get_history_in_timerange<'life0, 'async_trait>( &'life0 self, start: DateTime<Utc>, end: DateTime<Utc>, limit: usize, offset: usize, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<InvocationHistory>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get history entries within a time range, for monitoring log explorers.

Source

fn get_matching_runner_contexts<'life0, 'life1, 'async_trait>( &'life0 self, partial_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<StoredRunnerContext>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get runner contexts whose runner_id contains the given partial string.

Used for prefix/partial matching on runner IDs.

Implementors§