pub enum AlertLevel {
Ok,
Warning,
Critical,
}Expand description
How urgently a failing renewal should be surfaced.
Three levels rather than a boolean because “renewal is failing” is not the same fact on day one of a 30-day runway as it is on day twenty-nine — the epic asks for exactly this distinction: a renewal that has been failing quietly for days must not first become visible as a total outage, which means the loudness has to climb before expiry, not at it.
Variants§
Ok
Not due, or due and either succeeding or not yet retried enough times to distinguish transient trouble from a real problem.
Warning
Renewal is due and has been failing long enough that a human should know, well before it is urgent.
Critical
Renewal is failing and expiry is close enough that this is the last reasonable window to intervene before every agent stops resolving.
Implementations§
Source§impl AlertLevel
impl AlertLevel
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The name this level carries outside the process — in GET /health’s
body, and so in whatever alarm reads that body.
A method rather than a Serialize derive because the wire spelling
is a contract with an alarm expression, and one that changes when a
variant is renamed is a contract that breaks silently. Spelled out
here, a rename is a compile error at this match instead.
Trait Implementations§
Source§impl Clone for AlertLevel
impl Clone for AlertLevel
Source§fn clone(&self) -> AlertLevel
fn clone(&self) -> AlertLevel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AlertLevel
impl Debug for AlertLevel
Source§impl Ord for AlertLevel
impl Ord for AlertLevel
Source§fn cmp(&self, other: &AlertLevel) -> Ordering
fn cmp(&self, other: &AlertLevel) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for AlertLevel
impl PartialEq for AlertLevel
Source§fn eq(&self, other: &AlertLevel) -> bool
fn eq(&self, other: &AlertLevel) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for AlertLevel
impl PartialOrd for AlertLevel
impl Copy for AlertLevel
impl Eq for AlertLevel
impl StructuralPartialEq for AlertLevel
Auto Trait Implementations§
impl Freeze for AlertLevel
impl RefUnwindSafe for AlertLevel
impl Send for AlertLevel
impl Sync for AlertLevel
impl Unpin for AlertLevel
impl UnsafeUnpin for AlertLevel
impl UnwindSafe for AlertLevel
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.