pub enum AlertCondition {
EventType(String),
TaskFailed,
TaskRetryExceeded(u32),
WorkerOffline,
RateExceeds {
threshold: f64,
window_secs: u64,
},
Custom(Arc<dyn Fn(&Event) -> bool + Send + Sync>),
}Expand description
Event alert condition for triggering notifications
Variants§
EventType(String)
Alert on specific event type
TaskFailed
Alert when task fails
TaskRetryExceeded(u32)
Alert when task exceeds retry count
WorkerOffline
Alert when worker goes offline
RateExceeds
Alert when event rate exceeds threshold (events per second)
Custom(Arc<dyn Fn(&Event) -> bool + Send + Sync>)
Alert on custom condition
Implementations§
Source§impl AlertCondition
impl AlertCondition
Sourcepub fn check(&self, event: &Event, context: &AlertContext) -> bool
pub fn check(&self, event: &Event, context: &AlertContext) -> bool
Check if an event triggers this alert condition
Trait Implementations§
Source§impl Clone for AlertCondition
impl Clone for AlertCondition
Auto Trait Implementations§
impl !RefUnwindSafe for AlertCondition
impl !UnwindSafe for AlertCondition
impl Freeze for AlertCondition
impl Send for AlertCondition
impl Sync for AlertCondition
impl Unpin for AlertCondition
impl UnsafeUnpin for AlertCondition
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