pub struct AlertManager { /* private fields */ }Expand description
Main alert manager
Implementations§
Source§impl AlertManager
impl AlertManager
pub async fn new( config: AlertConfig, metrics_collector: Arc<MetricsCollector>, ) -> RragResult<Self>
pub async fn start(&self) -> RragResult<()>
pub async fn stop(&self) -> RragResult<()>
pub async fn is_healthy(&self) -> bool
pub async fn add_alert_rule(&self, rule: AlertRule) -> RragResult<()>
pub async fn remove_alert_rule(&self, rule_id: &str) -> RragResult<()>
pub async fn acknowledge_alert( &self, rule_id: &str, acknowledged_by: impl Into<String>, ) -> RragResult<()>
pub async fn get_active_alerts(&self) -> Vec<AlertNotification>
pub async fn get_alert_rules(&self) -> Vec<AlertRule>
pub async fn get_alert_stats(&self) -> AlertStats
Auto Trait Implementations§
impl Freeze for AlertManager
impl !RefUnwindSafe for AlertManager
impl Send for AlertManager
impl Sync for AlertManager
impl Unpin for AlertManager
impl !UnwindSafe for AlertManager
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