pub struct WorkflowMonitor { /* private fields */ }Expand description
Workflow monitor for real-time monitoring
Implementations§
Source§impl WorkflowMonitor
impl WorkflowMonitor
Sourcepub fn new(config: MonitoringConfig) -> Self
pub fn new(config: MonitoringConfig) -> Self
Create a new workflow monitor
Sourcepub async fn start(&self) -> Result<(), WorkflowError>
pub async fn start(&self) -> Result<(), WorkflowError>
Start the monitor
Sourcepub async fn register_alert_handler(&self, handler: Box<dyn AlertHandler>)
pub async fn register_alert_handler(&self, handler: Box<dyn AlertHandler>)
Register an alert handler
Sourcepub async fn record_event(
&self,
event: MonitoringEvent,
) -> Result<(), WorkflowError>
pub async fn record_event( &self, event: MonitoringEvent, ) -> Result<(), WorkflowError>
Record a monitoring event
Sourcepub async fn get_workflow_metrics(
&self,
workflow_id: &WorkflowId,
) -> Option<WorkflowMonitoringData>
pub async fn get_workflow_metrics( &self, workflow_id: &WorkflowId, ) -> Option<WorkflowMonitoringData>
Get workflow metrics
Sourcepub async fn get_system_metrics(&self) -> SystemMetrics
pub async fn get_system_metrics(&self) -> SystemMetrics
Get system metrics
Sourcepub async fn get_recent_events(&self, count: usize) -> Vec<MonitoringEvent>
pub async fn get_recent_events(&self, count: usize) -> Vec<MonitoringEvent>
Get recent events
Sourcepub async fn get_workflow_summary(&self) -> WorkflowSummary
pub async fn get_workflow_summary(&self) -> WorkflowSummary
Get workflow summary
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WorkflowMonitor
impl !RefUnwindSafe for WorkflowMonitor
impl Send for WorkflowMonitor
impl Sync for WorkflowMonitor
impl Unpin for WorkflowMonitor
impl !UnwindSafe for WorkflowMonitor
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