Skip to main content

Module device_state

Module device_state 

Source
Expand description

Device connection-state tracking (DeviceState) and typed registration outcome (RegistrationError). Device connection-state tracking: a push-style view of where a Runtime is in its control-plane lifecycle, plus a typed registration outcome.

Mirrors the part of Go tsnet/ipn’s state machine an embedder actually reacts to: is the node still coming up, running, waiting for interactive login, expired, or did registration hard-fail? The ControlRunner publishes transitions into a watch cell so an embedder can await them (Runtime::watch_state) instead of polling status, and Runtime::wait_until_running is a one-shot convenience built on the same cell.

Enums§

DeviceState
The control-plane lifecycle state of a device.
RegistrationError
A typed registration outcome, distinguishing a permanent failure (don’t retry — tell the user) from a transient one (worth retrying).