pub struct AlertManager { /* private fields */ }
Expand description
Alert manager
Implementations§
Source§impl AlertManager
impl AlertManager
Sourcepub fn new(config: AlertConfig) -> Self
pub fn new(config: AlertConfig) -> Self
Create a new alert manager
Sourcepub async fn get_active_alerts(&self) -> Vec<Alert>
pub async fn get_active_alerts(&self) -> Vec<Alert>
Get active alerts
Sourcepub async fn get_alert_history(&self) -> Vec<Alert>
pub async fn get_alert_history(&self) -> Vec<Alert>
Get alert history
Sourcepub async fn acknowledge_alert(
&self,
alert_id: Uuid,
acknowledged_by: String,
) -> Result<(), AlertError>
pub async fn acknowledge_alert( &self, alert_id: Uuid, acknowledged_by: String, ) -> Result<(), AlertError>
Acknowledge an alert
Sourcepub async fn resolve_alert(&self, alert_id: Uuid) -> Result<(), AlertError>
pub async fn resolve_alert(&self, alert_id: Uuid) -> Result<(), AlertError>
Resolve an alert
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