pub struct MonitoringService { /* private fields */ }Expand description
Monitoring service for tracking workflow execution.
Implementations§
Source§impl MonitoringService
impl MonitoringService
Sourcepub fn start_workflow(
&self,
workflow_id: WorkflowId,
workflow_name: String,
total_tasks: usize,
)
pub fn start_workflow( &self, workflow_id: WorkflowId, workflow_name: String, total_tasks: usize, )
Start tracking a workflow.
Sourcepub fn update_task(
&self,
workflow_id: WorkflowId,
task_id: TaskId,
task_name: String,
state: TaskState,
error: Option<String>,
)
pub fn update_task( &self, workflow_id: WorkflowId, task_id: TaskId, task_name: String, state: TaskState, error: Option<String>, )
Update task progress.
Sourcepub fn complete_workflow(&self, workflow_id: WorkflowId, success: bool)
pub fn complete_workflow(&self, workflow_id: WorkflowId, success: bool)
Complete workflow tracking.
Sourcepub fn get_workflow_metrics(
&self,
workflow_id: &WorkflowId,
) -> Option<WorkflowMetrics>
pub fn get_workflow_metrics( &self, workflow_id: &WorkflowId, ) -> Option<WorkflowMetrics>
Get workflow metrics.
Sourcepub fn get_active_workflows(&self) -> Vec<WorkflowMetrics>
pub fn get_active_workflows(&self) -> Vec<WorkflowMetrics>
Get all active workflow metrics.
Sourcepub fn get_history(&self, limit: Option<usize>) -> Vec<WorkflowMetrics>
pub fn get_history(&self, limit: Option<usize>) -> Vec<WorkflowMetrics>
Get workflow history.
Sourcepub fn clear_history(&self, older_than: DateTime<Utc>)
pub fn clear_history(&self, older_than: DateTime<Utc>)
Clear old history entries.
Sourcepub fn get_statistics(&self) -> SystemStatistics
pub fn get_statistics(&self) -> SystemStatistics
Get system-wide statistics.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MonitoringService
impl !UnwindSafe for MonitoringService
impl Freeze for MonitoringService
impl Send for MonitoringService
impl Sync for MonitoringService
impl Unpin for MonitoringService
impl UnsafeUnpin for MonitoringService
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