Expand description
Client-side dialer for the daemon.
Used by the zero-commands real SupervisorSource adapter
and by the integration tests. A thin wrapper over a
UnixStream: one request per dial, line-delimited JSON,
hard-timed.
§Why one-shot
The CLI is the supervisor’s client, not a long-lived session. Every dial is a discrete intent (“arm”, “disarm”, “kill”, “how are you”). Reusing a connection would save a handful of microseconds at the cost of having to reason about a half-closed socket during a kill-switch round-trip. We trade throughput for clarity here — the supervisor fields human-scale request rates.
Structs§
- Client
- Dialer pinned at a socket path. Cheap to construct; the
actual
UnixStreamis opened per-request.
Enums§
Constants§
- DIAL_
TIMEOUT - Total round-trip budget for a single dial. Generous: the daemon’s hottest path is a local socket write + in-memory state flip + JSON serialize. If we don’t have an answer in 2 s the daemon is wedged and the operator should know.