pub trait WorkflowStore: Send + Sync {
// Required methods
fn save_execution<'life0, 'life1, 'async_trait>(
&'life0 self,
execution: &'life1 WorkflowExecution,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_execution<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 WorkflowExecutionId,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowExecution>, WorkflowError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_execution<'life0, 'life1, 'async_trait>(
&'life0 self,
execution: &'life1 WorkflowExecution,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn add_event<'life0, 'life1, 'async_trait>(
&'life0 self,
execution_id: &'life1 WorkflowExecutionId,
event: ExecutionEvent,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_events<'life0, 'life1, 'async_trait>(
&'life0 self,
execution_id: &'life1 WorkflowExecutionId,
) -> Pin<Box<dyn Future<Output = Result<Vec<ExecutionEvent>, WorkflowError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_running_executions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowExecution>, WorkflowError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn put<'life0, 'async_trait>(
&'life0 self,
key: String,
value: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, WorkflowError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_keys_with_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, WorkflowError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
ワークフロー永続化インターフェース
Required Methods§
Sourcefn save_execution<'life0, 'life1, 'async_trait>(
&'life0 self,
execution: &'life1 WorkflowExecution,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_execution<'life0, 'life1, 'async_trait>(
&'life0 self,
execution: &'life1 WorkflowExecution,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
ワークフロー実行を保存
Sourcefn get_execution<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 WorkflowExecutionId,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowExecution>, WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_execution<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 WorkflowExecutionId,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowExecution>, WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
ワークフロー実行を取得
Sourcefn update_execution<'life0, 'life1, 'async_trait>(
&'life0 self,
execution: &'life1 WorkflowExecution,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_execution<'life0, 'life1, 'async_trait>(
&'life0 self,
execution: &'life1 WorkflowExecution,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
ワークフロー実行を更新
Sourcefn add_event<'life0, 'life1, 'async_trait>(
&'life0 self,
execution_id: &'life1 WorkflowExecutionId,
event: ExecutionEvent,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_event<'life0, 'life1, 'async_trait>(
&'life0 self,
execution_id: &'life1 WorkflowExecutionId,
event: ExecutionEvent,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
実行イベントを追加
Sourcefn get_events<'life0, 'life1, 'async_trait>(
&'life0 self,
execution_id: &'life1 WorkflowExecutionId,
) -> Pin<Box<dyn Future<Output = Result<Vec<ExecutionEvent>, WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_events<'life0, 'life1, 'async_trait>(
&'life0 self,
execution_id: &'life1 WorkflowExecutionId,
) -> Pin<Box<dyn Future<Output = Result<Vec<ExecutionEvent>, WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
実行イベントを取得
Sourcefn get_running_executions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowExecution>, WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_running_executions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowExecution>, WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
実行中のワークフロー一覧を取得
Sourcefn put<'life0, 'async_trait>(
&'life0 self,
key: String,
value: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put<'life0, 'async_trait>(
&'life0 self,
key: String,
value: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), WorkflowError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
任意のキーバリューストレージ