Skip to main content

SupervisorEntry

Struct SupervisorEntry 

Source
pub struct SupervisorEntry {
    pub module_id: String,
    pub state: String,
    pub enabled: bool,
    pub live: bool,
    pub health: SupervisorHealthStatus,
    pub last_probe_ms: Option<u64>,
    pub last_exit_code: Option<i32>,
    pub last_exit_signal: Option<i32>,
    pub restart_count: Option<u32>,
    pub max_restarts: Option<u32>,
}

Fields§

§module_id: String§state: String§enabled: bool§live: bool§health: SupervisorHealthStatus§last_probe_ms: Option<u64>

When the daemon last collected this module’s health, as unix milliseconds. Absent means NEVER PROBED (a module inside its first probe window, whose health is therefore Unknown rather than good), not probed-long-ago. An old value and an absent one call for opposite readings, so do not render them alike.

§last_exit_code: Option<i32>

Exit code of the module’s most recent process exit, if the process has exited at least once. Survives respawn so a now-running module still reports what killed its previous incarnation.

§last_exit_signal: Option<i32>

Terminating signal of the module’s most recent process exit (Unix), if any. Some(9) = SIGKILL (OOM/jetsam/kill-on-drop), Some(6) = SIGABRT (often a panic-abort). Survives respawn.

§restart_count: Option<u32>

Replacement processes spawned for this module so far, against the budget that disables it.

THIS IS THE COUNTER THAT ENDS A MODULE, and it is not the one beside it. SupervisorHealthEntry::consecutive_failures returns to zero on any successful probe, so a module can miss probes all day and read zero; this one only decreases when an operator restarts, reloads, or re-enables the module. Reaching the budget moves it to Failed and it stays there until somebody intervenes.

So a module one restart from being disabled is indistinguishable from a freshly booted one unless this pair is read. Both are reported together because the count alone does not say how close it is.

Absent from daemons predating the field, which is why it is optional rather than defaulted to zero: zero would assert a full budget.

§max_restarts: Option<u32>

Replacement processes this module is allowed before it is disabled. See restart_count; absent on daemons predating the field.

Trait Implementations§

Source§

impl Clone for SupervisorEntry

Source§

fn clone(&self) -> SupervisorEntry

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SupervisorEntry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SupervisorEntry

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for SupervisorEntry

Source§

impl PartialEq for SupervisorEntry

Source§

fn eq(&self, other: &SupervisorEntry) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for SupervisorEntry

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for SupervisorEntry

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.