#[repr(u8)]pub enum Status {
Ok = 0,
Degraded = 1,
Critical = 2,
Stall = 3,
}Expand description
Health status reported by an agent in a single VLP frame.
The discriminants are explicit because they form part of the on-wire
contract: agents serialise Status as u8 and observers reconstruct via
Status::try_from_u8.
This enum is exhaustive. Adding a variant is a workspace-wide compile-error
change. The wire format (version-pinned by VERSION) guarantees that no
in-memory Status value exists outside this list; unknown bytes are rejected
by Status::try_from_u8 as DecodeError::BadStatus.
Variants§
Ok = 0
The agent is healthy and making progress.
Degraded = 1
The agent is making progress but reporting elevated trouble (e.g. retrying, throttled).
Critical = 2
The agent is about to die. Emitted by the panic hook in
varta-client immediately before unwinding.
Stall = 3
The agent appears stuck. Emitted by varta-watch when no beat has
arrived within the configured threshold.
Implementations§
Source§impl Status
impl Status
Sourcepub fn try_from_u8(byte: u8) -> Result<Status, DecodeError>
pub fn try_from_u8(byte: u8) -> Result<Status, DecodeError>
Decode a status byte from the wire format. Returns
DecodeError::BadStatus carrying the offending byte if the value is
not a known variant.