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: ModuleProtocolThe module’s declared wire protocol, carried beside live because it is
what makes live readable: the two fields answer one question together.
live: boolWhether 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: u32Crash 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: u32Replacement 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: u32The 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: DurationThe 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: DurationEffective 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