Skip to main content

Module coordinator

Module coordinator 

Source
Expand description

Whether this host has joined a coordinator, and how its link is doing.

Two small records, one in each direction, like crate::polling:

  • config/coordinator.toml — the coordinator’s URL, this host’s id there and the name it was given. Written by coordinator join, removed by coordinator leave. Nothing secret: the host’s private key lives in the secret store (crate::secrets::SecretItem::CoordinatorKey), never here. An absent file means “not configured”, and the daemon then behaves exactly as it does without a coordinator.
  • state/coordinator-link.toml — written by the daemon, read by status, host doctor and the TUI, which run in the operator’s terminal while the daemon runs in a service.

Structs§

CoordinatorConfig
What coordinator join recorded.
LinkRecord
The daemon’s link to its coordinator, as it last wrote it.

Constants§

CONFIG_FILE
The setting, inside config/.
LINK_FILE
The daemon’s link state, inside state/.

Functions§

configured
The joined coordinator, or None when this host has not joined one.
forget
Forgets the coordinator and the daemon’s last link state.
last_link
The daemon’s last link state, or None when it never wrote one.
record_link
Writes the link state.
save
Records the joined coordinator.