pub struct WorkflowStateManager { /* private fields */ }
Expand description
ワークフロー状態マネージャー - MVCCベースの実装
Implementations§
Source§impl WorkflowStateManager
impl WorkflowStateManager
pub fn new() -> Self
Sourcepub async fn create_execution(
&self,
workflow_ir: &WorkflowIR,
inputs: HashMap<String, Value>,
) -> Result<WorkflowExecutionId, WorkflowError>
pub async fn create_execution( &self, workflow_ir: &WorkflowIR, inputs: HashMap<String, Value>, ) -> Result<WorkflowExecutionId, WorkflowError>
MVCCベースのワークフロー実行作成
Sourcepub async fn get_execution_at(
&self,
id: &WorkflowExecutionId,
tx_id: Option<TxId>,
) -> Option<WorkflowExecution>
pub async fn get_execution_at( &self, id: &WorkflowExecutionId, tx_id: Option<TxId>, ) -> Option<WorkflowExecution>
指定されたTxId時点での実行状態を取得(MVCC対応)
Sourcepub async fn get_execution(
&self,
id: &WorkflowExecutionId,
) -> Option<WorkflowExecution>
pub async fn get_execution( &self, id: &WorkflowExecutionId, ) -> Option<WorkflowExecution>
最新バージョンの実行状態を取得
Sourcepub async fn update_execution(
&self,
execution: WorkflowExecution,
) -> Result<TxId, WorkflowError>
pub async fn update_execution( &self, execution: WorkflowExecution, ) -> Result<TxId, WorkflowError>
MVCCベースの実行状態更新
Sourcepub async fn get_execution_history(
&self,
id: &WorkflowExecutionId,
) -> Vec<(TxId, WorkflowExecution)>
pub async fn get_execution_history( &self, id: &WorkflowExecutionId, ) -> Vec<(TxId, WorkflowExecution)>
実行のバージョン履歴を取得
Sourcepub async fn create_snapshot(
&self,
execution_id: &WorkflowExecutionId,
max_versions: usize,
) -> Result<(), WorkflowError>
pub async fn create_snapshot( &self, execution_id: &WorkflowExecutionId, max_versions: usize, ) -> Result<(), WorkflowError>
スナップショット作成(古いバージョンのクリーンアップ)
Sourcepub async fn get_running_executions(&self) -> Vec<WorkflowExecution>
pub async fn get_running_executions(&self) -> Vec<WorkflowExecution>
実行中のワークフロー一覧を取得
Sourcepub async fn add_execution_event(
&self,
execution_id: &WorkflowExecutionId,
event: ExecutionEvent,
) -> Result<TxId, WorkflowError>
pub async fn add_execution_event( &self, execution_id: &WorkflowExecutionId, event: ExecutionEvent, ) -> Result<TxId, WorkflowError>
実行イベントを追加
Auto Trait Implementations§
impl !Freeze for WorkflowStateManager
impl !RefUnwindSafe for WorkflowStateManager
impl Send for WorkflowStateManager
impl Sync for WorkflowStateManager
impl Unpin for WorkflowStateManager
impl !UnwindSafe for WorkflowStateManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more