pub struct SelfNetwork {
pub online: bool,
pub home_relay: Option<String>,
pub relays: Vec<RelayInfo>,
pub direct_addrs: Vec<String>,
pub last_change_epoch: Option<i64>,
}Expand description
The status.self_network block (#90): THIS node’s own reachability posture — the first
question in every “my message never arrived” investigation, previously unanswerable from
either side of the API. Self-facing only: everything here is the node’s own information
(relay URLs come from its own config, sanitized; direct addresses already ride its invites).
online is iroh’s own semantics — a home-relay connection is established. In
relay_mode = "disabled" it is ALWAYS false with an empty relays list: that is a
configuration, not an outage — render it as “LAN-only”, never as a health warning.
Additive-only.
Default is {online: false, relays: []} — which is exactly the shape above meaning
“deliberately LAN-only” (#148). The porcelain reads it that way and SUPPRESSES the “no relay
connection” line for it. So a fixture built with ..Default::default() claims a healthy
LAN-only posture, not an unknown one. There is no third value for a bool; the honest way to
say “nobody looked” is StatusResult.self_network: None, which is what a defaulted
StatusResult gives you.
Fields§
§online: boolA home-relay connection is established (iroh’s online definition). The signal #53’s
set_relays never had: when this goes false on a relay-enabled node, the relay set is
the thing to look at.
home_relay: Option<String>The CONNECTED home relay’s URL, sanitized to scheme + host + port (operator-supplied
relay URLs can carry userinfo tokens; status output gets screenshotted). None when
no relay is connected.
relays: Vec<RelayInfo>Every known home relay and its current connection state. Empty when no relays are configured, or before the endpoint has selected any.
direct_addrs: Vec<String>This endpoint’s direct (non-relay) socket addresses — its own dialable coordinates.
last_change_epoch: Option<i64>When the daemon’s watcher last observed a TRANSITION (epoch seconds) — a change of
online, home_relay, or a relay’s connection state; direct_addrs drift alone does
not stamp (nor emit a frame). OMITTED (not null) until the first observed transition
after boot, and from a point-in-time computation with no watcher running.
Trait Implementations§
Source§impl Clone for SelfNetwork
impl Clone for SelfNetwork
Source§fn clone(&self) -> SelfNetwork
fn clone(&self) -> SelfNetwork
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more