status
Module: status
Section titled “Module: status”Contents
Section titled “Contents”Structs
ComponentStatus- Snapshot of one component’s runtime state.StackStatus- Aggregate stack snapshot returned by [status].
Enums
State- Reported state of an individual stack component.
Functions
status- Return current stack status.
firma_stack::status::ComponentStatus
Section titled “firma_stack::status::ComponentStatus”Struct
Snapshot of one component’s runtime state.
Fields:
name: String- Logical component name (authority/sidecar).pid: Option<u32>- PID read from<state_dir>/<name>.pid, when present.state: State- Coarse-grained state. See [State].listen: Option<std::net::SocketAddr>- Listen address read from<state_dir>/<name>.listen(written atuptime_secs: Option<u64>- Seconds since the pidfile was written, used as a proxy for process
Trait Implementations:
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
- Clone
fn clone(self: &Self) -> ComponentStatus
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_stack::status::StackStatus
Section titled “firma_stack::status::StackStatus”Struct
Aggregate stack snapshot returned by [status].
Fields:
components: Vec<ComponentStatus>- One entry per known component (authority first, then sidecar).
Trait Implementations:
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
- Clone
fn clone(self: &Self) -> StackStatus
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_stack::status::State
Section titled “firma_stack::status::State”Enum
Reported state of an individual stack component.
Variants:
Running- Pidfile present, process alive, listen port accepting connections.Unhealthy- Pidfile present, process alive, but the listen port is closed.Stopped- No pidfile, or the recorded pid no longer exists.Unknown- Pidfile present but liveness or port probe could not be performed
Traits: Eq, Copy
Trait Implementations:
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
- PartialEq
fn eq(self: &Self, other: &State) -> bool
- Clone
fn clone(self: &Self) -> State
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_stack::status::status
Section titled “firma_stack::status::status”Function
Return current stack status.
Errors
Section titled “Errors”Currently returns no error, but keeps a fallible API for future probes.
fn status(state_dir: &std::path::Path) -> crate::error::Result<StackStatus>