Skip to main content

proxy_pilot/notify/
mod.rs

1pub mod bale;
2
3use async_trait::async_trait;
4
5use crate::error::Result;
6
7#[derive(Debug, Clone)]
8pub enum AlertSeverity {
9    Info,
10    Warning,
11    Critical,
12}
13
14#[derive(Debug, Clone)]
15pub struct AlertEvent {
16    pub severity: AlertSeverity,
17    pub title: String,
18    pub message: String,
19}
20
21/// Abstraction over notification channels (Bale, SMS, Email, Heartbeat, Webhook).
22#[async_trait]
23pub trait Notifier: Send + Sync {
24    fn channel_name(&self) -> &'static str;
25    async fn send(&self, event: &AlertEvent) -> Result<()>;
26}