Skip to content

status

Structs

Enums

  • State - Reported state of an individual stack component.

Functions

  • status - Return current stack status.

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 at
  • uptime_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

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

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

Function

Return current stack status.

Currently returns no error, but keeps a fallible API for future probes.

fn status(state_dir: &std::path::Path) -> crate::error::Result<StackStatus>