pub struct EventSourcingManager { /* private fields */ }
Expand description
イベントソーシングマネージャー - 完全なイベントドリブン永続化
Implementations§
Source§impl EventSourcingManager
impl EventSourcingManager
pub fn new(store: Arc<dyn WorkflowStore>) -> Self
pub fn with_snapshot_config( self, snapshot_interval: usize, max_versions: usize, ) -> Self
Sourcepub async fn rebuild_execution(
&self,
execution_id: &WorkflowExecutionId,
) -> Result<Option<WorkflowExecution>, WorkflowError>
pub async fn rebuild_execution( &self, execution_id: &WorkflowExecutionId, ) -> Result<Option<WorkflowExecution>, WorkflowError>
ワークフロー実行をイベントから再構築
Sourcepub async fn record_event(
&self,
execution_id: &WorkflowExecutionId,
event_type: ExecutionEventType,
payload: HashMap<String, Value>,
) -> Result<(), WorkflowError>
pub async fn record_event( &self, execution_id: &WorkflowExecutionId, event_type: ExecutionEventType, payload: HashMap<String, Value>, ) -> Result<(), WorkflowError>
ワークフローイベントを記録(スナップショット最適化付き)
Sourcepub async fn needs_snapshot(
&self,
execution_id: &WorkflowExecutionId,
) -> Result<bool, WorkflowError>
pub async fn needs_snapshot( &self, execution_id: &WorkflowExecutionId, ) -> Result<bool, WorkflowError>
スナップショットが必要かチェック
Sourcepub async fn create_snapshot(
&self,
execution_id: &WorkflowExecutionId,
) -> Result<(), WorkflowError>
pub async fn create_snapshot( &self, execution_id: &WorkflowExecutionId, ) -> Result<(), WorkflowError>
スナップショットを作成(最新の実行状態を保存)
Sourcepub async fn cleanup_old_events(
&self,
execution_id: &WorkflowExecutionId,
) -> Result<(), WorkflowError>
pub async fn cleanup_old_events( &self, execution_id: &WorkflowExecutionId, ) -> Result<(), WorkflowError>
古いイベントをクリーンアップ
Sourcepub async fn get_full_event_history(
&self,
execution_id: &WorkflowExecutionId,
) -> Result<Vec<ExecutionEvent>, WorkflowError>
pub async fn get_full_event_history( &self, execution_id: &WorkflowExecutionId, ) -> Result<Vec<ExecutionEvent>, WorkflowError>
ワークフロー実行の完全なイベント履歴を取得
Sourcepub async fn rebuild_execution_from_events(
&self,
execution_id: &WorkflowExecutionId,
) -> Result<Option<WorkflowExecution>, WorkflowError>
pub async fn rebuild_execution_from_events( &self, execution_id: &WorkflowExecutionId, ) -> Result<Option<WorkflowExecution>, WorkflowError>
イベントベースのワークフロー状態再構築
Auto Trait Implementations§
impl Freeze for EventSourcingManager
impl !RefUnwindSafe for EventSourcingManager
impl Send for EventSourcingManager
impl Sync for EventSourcingManager
impl Unpin for EventSourcingManager
impl !UnwindSafe for EventSourcingManager
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