AlertSink

Trait AlertSink 

Source
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§

Source

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.

Source

fn sink_name(&self) -> &str

Get the sink name.

Source

fn accepts_severity(&self, severity: AlertSeverity) -> bool

Check if this sink accepts alerts of the given severity.

Source

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.

Implementors§