Expand description
The cloud-link sidecar: whether this node’s cloud relay is actually talking to the cloud.
ados-cloud rewrites it on every heartbeat tick with the MQTT broker
session state (the transport’s ConnAck-driven flag, never “the task is
alive”) and the outcome of the last /agent/status POST. ados-control
serves it at GET /api/cloud/link for the dashboard. A file not rewritten
within CLOUD_LINK_STALE_MS reads as absent, so a dead relay process never
leaves a frozen “connected” behind.
Structs§
- Cloud
Link - The relay’s live link state.
Constants§
- CLOUD_
LINK_ SIDECAR - The cloud-link sidecar path (tmpfs, cleared on boot).
- CLOUD_
LINK_ SIDECAR_ VERSION - The sidecar schema version, stamped on write and checked (warn-only) on read.
- CLOUD_
LINK_ STALE_ MS - Four heartbeat ticks (5 s each): past this the writer is gone.
Functions§
- read_
cloud_ link - Read the sidecar from its default path.
- read_
cloud_ link_ from - Read the sidecar at
path, orNonewhen absent, unparseable, undated or stale atnow_ms. - write_
cloud_ link - Atomically write
linkto the default path. - write_
cloud_ link_ to - Atomically write
linktopath(tmp + rename).