pub struct AlertManager { /* private fields */ }
Implementations§
Source§impl AlertManager
impl AlertManager
pub fn new() -> Self
Sourcepub fn evaluate_alerts(
&mut self,
health: &SystemHealth,
_metrics: Option<&PerformanceMetrics>,
)
pub fn evaluate_alerts( &mut self, health: &SystemHealth, _metrics: Option<&PerformanceMetrics>, )
Evaluate all alert rules against current system state
Sourcepub fn get_active_alerts(&self) -> Vec<&Alert>
pub fn get_active_alerts(&self) -> Vec<&Alert>
Get all active alerts
Sourcepub fn remove_rule(&mut self, rule_name: &str) -> bool
pub fn remove_rule(&mut self, rule_name: &str) -> bool
Remove alert rule
Sourcepub fn cleanup_old_alerts(&mut self, max_age_hours: u32)
pub fn cleanup_old_alerts(&mut self, max_age_hours: u32)
Clear old alerts from history
Trait Implementations§
Source§impl Clone for AlertManager
impl Clone for AlertManager
Source§fn clone(&self) -> AlertManager
fn clone(&self) -> AlertManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AlertManager
impl Debug for AlertManager
Source§impl Default for AlertManager
impl Default for AlertManager
Source§impl<'de> Deserialize<'de> for AlertManager
impl<'de> Deserialize<'de> for AlertManager
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more