#[non_exhaustive]pub struct AlertWindow {
pub severity: Severity,
pub long: Window,
pub short: Window,
pub factor: f64,
}Expand description
One burn-rate condition: a long and short window that must both be burning
faster than factor times the budget for the alert to fire.
The struct is #[non_exhaustive] so per-condition options (for example a
for duration or per-condition labels) can be added without a breaking
change; build values with AlertWindow::new. The fields stay public for
reading and mutation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.severity: SeverityWhether this condition pages or tickets.
long: WindowThe long lookback window (e.g. 1h).
short: WindowThe short lookback window that confirms the burn is still happening
(e.g. 5m).
factor: f64The burn-rate multiplier that triggers this condition.
Implementations§
Trait Implementations§
Source§impl Clone for AlertWindow
impl Clone for AlertWindow
Source§fn clone(&self) -> AlertWindow
fn clone(&self) -> AlertWindow
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AlertWindow
Source§impl Debug for AlertWindow
impl Debug for AlertWindow
Source§impl PartialEq for AlertWindow
impl PartialEq for AlertWindow
impl StructuralPartialEq for AlertWindow
Auto Trait Implementations§
impl Freeze for AlertWindow
impl RefUnwindSafe for AlertWindow
impl Send for AlertWindow
impl Sync for AlertWindow
impl Unpin for AlertWindow
impl UnsafeUnpin for AlertWindow
impl UnwindSafe for AlertWindow
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