pub struct WorkflowCoordinator { /* private fields */ }Expand description
Workflow coordinator manages distributed workflow execution
Implementations§
Source§impl WorkflowCoordinator
impl WorkflowCoordinator
Sourcepub fn new(
local_peer_id: String,
endpoint: Arc<NatTraversalEndpoint>,
capabilities: NodeCapabilities,
) -> Self
pub fn new( local_peer_id: String, endpoint: Arc<NatTraversalEndpoint>, capabilities: NodeCapabilities, ) -> Self
Create a new workflow coordinator
Sourcepub async fn start(&self) -> Result<(), WorkflowError>
pub async fn start(&self) -> Result<(), WorkflowError>
Start the coordinator
Sourcepub async fn coordinate_workflow(
&self,
workflow_id: WorkflowId,
participants: Vec<String>,
stage_assignments: HashMap<StageId, String>,
coordination_timeout: Duration,
) -> Result<WorkflowCoordinationResult, WorkflowError>
pub async fn coordinate_workflow( &self, workflow_id: WorkflowId, participants: Vec<String>, stage_assignments: HashMap<StageId, String>, coordination_timeout: Duration, ) -> Result<WorkflowCoordinationResult, WorkflowError>
Coordinate a workflow execution
Sourcepub async fn join_workflow(
&self,
workflow_id: WorkflowId,
coordinator: String,
) -> Result<(), WorkflowError>
pub async fn join_workflow( &self, workflow_id: WorkflowId, coordinator: String, ) -> Result<(), WorkflowError>
Join a coordinated workflow as a participant
Sourcepub async fn update_stage_status(
&self,
workflow_id: WorkflowId,
stage_id: StageId,
status: StageStatus,
metrics: StageMetrics,
) -> Result<(), WorkflowError>
pub async fn update_stage_status( &self, workflow_id: WorkflowId, stage_id: StageId, status: StageStatus, metrics: StageMetrics, ) -> Result<(), WorkflowError>
Update stage status
Sourcepub async fn signal_barrier_ready(
&self,
workflow_id: WorkflowId,
barrier_id: String,
) -> Result<(), WorkflowError>
pub async fn signal_barrier_ready( &self, workflow_id: WorkflowId, barrier_id: String, ) -> Result<(), WorkflowError>
Signal barrier readiness
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WorkflowCoordinator
impl !RefUnwindSafe for WorkflowCoordinator
impl Send for WorkflowCoordinator
impl Sync for WorkflowCoordinator
impl Unpin for WorkflowCoordinator
impl !UnwindSafe for WorkflowCoordinator
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