pub trait AlertSink: Send + Sync {
// Required methods
fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
alert: &'life1 Alert,
) -> Pin<Box<dyn Future<Output = AlertSinkResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn sink_name(&self) -> &str;
fn accepts_severity(&self, severity: AlertSeverity) -> bool;
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AlertSinkResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for pluggable alert destinations.
Required Methods§
Sourcefn send<'life0, 'life1, 'async_trait>(
&'life0 self,
alert: &'life1 Alert,
) -> Pin<Box<dyn Future<Output = AlertSinkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
alert: &'life1 Alert,
) -> Pin<Box<dyn Future<Output = AlertSinkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send an alert to the sink.
Sourcefn accepts_severity(&self, severity: AlertSeverity) -> bool
fn accepts_severity(&self, severity: AlertSeverity) -> bool
Check if this sink accepts alerts of the given severity.
Sourcefn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AlertSinkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AlertSinkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Health check the sink.