pub struct MwmbrConfig {
pub windows: Vec<AlertWindow>,
}Expand description
A multi-window multi-burn-rate alert configuration: the set of burn-rate conditions that, OR-ed together per severity, form the page and ticket alerts.
Fields§
§windows: Vec<AlertWindow>The burn-rate conditions, ordered page-first.
Implementations§
Source§impl MwmbrConfig
impl MwmbrConfig
Sourcepub fn sre_default() -> Self
pub fn sre_default() -> Self
The canonical SRE Workbook configuration for a 30-day SLO period:
| Severity | Long | Short | Factor |
|---|---|---|---|
| Page | 1h | 5m | 14.4 |
| Page | 6h | 30m | 6 |
| Ticket | 1d | 2h | 3 |
| Ticket | 3d | 6h | 1 |
Sourcepub fn for_severity(
&self,
severity: Severity,
) -> impl Iterator<Item = &AlertWindow>
pub fn for_severity( &self, severity: Severity, ) -> impl Iterator<Item = &AlertWindow>
The conditions for a given severity, in order.
Sourcepub fn lookback_windows(&self) -> Vec<Window>
pub fn lookback_windows(&self) -> Vec<Window>
Every distinct lookback window referenced by any condition, which is the set of windows the SLI recording rules must cover. Sorted shortest-first.
Trait Implementations§
Source§impl Clone for MwmbrConfig
impl Clone for MwmbrConfig
Source§fn clone(&self) -> MwmbrConfig
fn clone(&self) -> MwmbrConfig
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 moreSource§impl Debug for MwmbrConfig
impl Debug for MwmbrConfig
Source§impl Default for MwmbrConfig
impl Default for MwmbrConfig
Source§impl PartialEq for MwmbrConfig
impl PartialEq for MwmbrConfig
Source§fn eq(&self, other: &MwmbrConfig) -> bool
fn eq(&self, other: &MwmbrConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MwmbrConfig
Auto Trait Implementations§
impl Freeze for MwmbrConfig
impl RefUnwindSafe for MwmbrConfig
impl Send for MwmbrConfig
impl Sync for MwmbrConfig
impl Unpin for MwmbrConfig
impl UnsafeUnpin for MwmbrConfig
impl UnwindSafe for MwmbrConfig
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