Skip to main content

ModuleStatus

Struct ModuleStatus 

Source
pub struct ModuleStatus {
Show 21 fields pub module_id: String, pub state: ModuleState, pub enabled: bool, pub process_alive: bool, pub registration_active: bool, pub protocol: ModuleProtocol, pub live: bool, pub restart_count: u32, pub lifetime_restarts: u32, pub spawn_generation: u64, pub max_restarts: u32, pub restart_window: Duration, pub drain_timeout: Duration, pub restart_backoff: Duration, pub restart_max_backoff: Duration, pub pid: Option<u32>, pub spawned_at_ms: Option<u64>, pub spawned_from: Option<PathBuf>, pub process_start_time: Option<u64>, pub last_exit: Option<ExitReport>, pub health: ModuleHealthStatus,
}
Expand description

Point-in-time module status answerable by subc without forwarding to the module process.

Fields§

§module_id: String§state: ModuleState§enabled: bool§process_alive: bool§registration_active: bool§protocol: ModuleProtocol

The module’s declared wire protocol, carried beside live because it is what makes live readable: the two fields answer one question together.

§live: bool

Whether the module is serving, under the strongest definition the daemon can assert for its protocol.

A subc module must also be REGISTERED: its process being alive says nothing about whether it can take a request. A protocol: "none" module never registers, so that term is dropped and this falls back to “enabled, running, and the process the daemon launched is alive” – which is all the daemon observes about a process that speaks no subc wire. It stays a bool on the wire for compatibility; renderers pair it with protocol rather than printing it bare.

§restart_count: u32

Crash restarts spent INSIDE restart_window as of this read. Older restarts have already released their slot, so this count can go down without anybody touching the module.

§lifetime_restarts: u32

Replacement processes spawned over this module’s entire supervisor lifetime; unlike restart_count, this value is never reset by an operator action and never falls out of a window.

§spawn_generation: u64§max_restarts: u32

The budget restart_count is spent against. Carried alongside the count because the count alone does not say how close the module is to being disabled, and reporting one without the other is what makes an about-to-be-retired module look ordinary.

§restart_window: Duration

The span restart_count is counted over. Carried with the pair above for the same reason they are carried together: “2 of 3” means one thing for a ten-minute window and something else entirely for a lifetime.

§drain_timeout: Duration

Effective drain and restart timing policy used by this running module. These values are carried together with the restart budget so status readers can compare configured intent with what the supervisor applied.

§restart_backoff: Duration§restart_max_backoff: Duration§pid: Option<u32>§spawned_at_ms: Option<u64>§spawned_from: Option<PathBuf>§process_start_time: Option<u64>§last_exit: Option<ExitReport>§health: ModuleHealthStatus

Trait Implementations§

Source§

impl Clone for ModuleStatus

Source§

fn clone(&self) -> Self

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 ModuleStatus

Source§

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

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

impl PartialEq for ModuleStatus

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ModuleStatus

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more