Skip to main content

StateBackendQuery

Trait StateBackendQuery 

Source
pub trait StateBackendQuery: Send + Sync {
Show 13 methods // Required methods fn get_workflow_invocations<'life0, 'life1, 'async_trait>( &'life0 self, workflow_id: &'life1 InvocationId, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<InvocationId>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_child_invocations<'life0, 'life1, 'async_trait>( &'life0 self, parent_invocation_id: &'life1 InvocationId, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<InvocationId>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn store_workflow_run<'life0, 'life1, 'async_trait>( &'life0 self, workflow: &'life1 WorkflowIdentity, ) -> Pin<Box<dyn Future<Output = RustvelloResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_all_workflow_types<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<TaskId>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_workflow_runs<'life0, 'life1, 'async_trait>( &'life0 self, workflow_type: &'life1 TaskId, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<WorkflowIdentity>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn set_workflow_data<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, workflow_id: &'life1 InvocationId, key: &'life2 str, value: &'life3 str, ) -> Pin<Box<dyn Future<Output = RustvelloResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn get_workflow_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, workflow_id: &'life1 InvocationId, key: &'life2 str, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Option<String>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn store_app_info<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, info_json: &'life2 str, ) -> Pin<Box<dyn Future<Output = RustvelloResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn get_app_info<'life0, 'life1, 'async_trait>( &'life0 self, app_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Option<String>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_all_app_infos<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<(String, String)>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn store_workflow_sub_invocation<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, workflow_id: &'life1 InvocationId, sub_inv_id: &'life2 InvocationId, ) -> Pin<Box<dyn Future<Output = RustvelloResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn get_workflow_sub_invocations<'life0, 'life1, 'async_trait>( &'life0 self, workflow_id: &'life1 InvocationId, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<InvocationId>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; // Provided method fn get_all_workflow_runs<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<WorkflowIdentity>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... }
}
Expand description

Workflow queries, discovery, and data.

Required Methods§

Source

fn get_workflow_invocations<'life0, 'life1, 'async_trait>( &'life0 self, workflow_id: &'life1 InvocationId, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<InvocationId>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get all invocation IDs that belong to a workflow.

Source

fn get_child_invocations<'life0, 'life1, 'async_trait>( &'life0 self, parent_invocation_id: &'life1 InvocationId, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<InvocationId>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get direct child invocations of a parent invocation.

Source

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

Store a workflow run for tracking and monitoring.

Source

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

Retrieve all distinct workflow types (task IDs that have started workflows).

Source

fn get_workflow_runs<'life0, 'life1, 'async_trait>( &'life0 self, workflow_type: &'life1 TaskId, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<WorkflowIdentity>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Retrieve workflow run identities for a specific workflow type.

Source

fn set_workflow_data<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, workflow_id: &'life1 InvocationId, key: &'life2 str, value: &'life3 str, ) -> Pin<Box<dyn Future<Output = RustvelloResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Set a value in the workflow’s key-value data store.

Source

fn get_workflow_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, workflow_id: &'life1 InvocationId, key: &'life2 str, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get a value from the workflow’s key-value data store.

Source

fn store_app_info<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, app_id: &'life1 str, info_json: &'life2 str, ) -> Pin<Box<dyn Future<Output = RustvelloResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Store application info as opaque JSON.

Source

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

Get application info by ID.

Source

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

Get all stored application infos as (app_id, info_json) pairs.

Source

fn store_workflow_sub_invocation<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, workflow_id: &'life1 InvocationId, sub_inv_id: &'life2 InvocationId, ) -> Pin<Box<dyn Future<Output = RustvelloResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Record a sub-invocation belonging to a workflow.

Source

fn get_workflow_sub_invocations<'life0, 'life1, 'async_trait>( &'life0 self, workflow_id: &'life1 InvocationId, ) -> Pin<Box<dyn Future<Output = RustvelloResult<Vec<InvocationId>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get all sub-invocations for a workflow.

Provided Methods§

Source

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

Get all workflow runs across all types.

Default implementation calls get_all_workflow_types() then get_workflow_runs() for each. Backends can override for efficiency.

Implementors§