pub struct AlertManager { /* private fields */ }
Expand description
Alert manager for handling alerts and notifications
Implementations§
Source§impl AlertManager
impl AlertManager
Sourcepub fn with_config(config: AlertConfig) -> Self
pub fn with_config(config: AlertConfig) -> Self
Create a new alert manager with configuration
Sourcepub async fn initialize(&mut self) -> Result<(), String>
pub async fn initialize(&mut self) -> Result<(), String>
Initialize the alert manager
Sourcepub async fn check_metric(
&self,
metric: &Metric,
) -> Result<Option<Alert>, String>
pub async fn check_metric( &self, metric: &Metric, ) -> Result<Option<Alert>, String>
Check if a metric triggers any alerts
Sourcepub async fn get_active_alerts_count(&self) -> Result<usize, String>
pub async fn get_active_alerts_count(&self) -> Result<usize, String>
Get active alerts count
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 moreAuto 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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.