pub struct State {
pub status: Status,
pub since: u64,
pub fails: u32,
pub oks: u32,
pub failing_since: Option<u64>,
pub notified: Status,
pub down_since: Option<u64>,
pub downs: Vec<u64>,
pub flapping: bool,
pub cert_warned: Option<u64>,
pub first_check: Option<u64>,
pub never_up: bool,
}Expand description
A monitor’s state, kept across daemon restarts so a restart never sends a down (or an up) twice.
Fields§
§status: Status§since: u64Unix milliseconds the status began.
fails: u32Failed checks in a row.
oks: u32Successful checks in a row.
failing_since: Option<u64>When the current run of failures began.
notified: StatusWhat channels were last told.
down_since: Option<u64>When the incident channels were told about began.
downs: Vec<u64>Unix milliseconds of recent downs, for flap damping.
flapping: bool§cert_warned: Option<u64>The certificate (by its expiry, unix seconds) already warned about.
first_check: Option<u64>When the first check of a pending monitor ran.
never_up: boolPending for NEVER_UP_MS with only failures.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for State
impl<'de> Deserialize<'de> for State
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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