Expand description
Long-running WebSocket session that owns the worker’s lifecycle.
Replaces the four polling loops (spawn_heartbeat, spawn_claim_loop,
spawn_log_shipper, plus the implicit completion path) with a single
spawn_ws_session coordinator + a small handful of helper tasks that
all push frames through a shared WsSender.
Reconnect policy: on a transport error or non-auth close, back off
BASE_BACKOFF_MS * 2^attempt and try again, up to
cfg.ws_reconnect_attempts. Out of retries \u2192 return Err and the
systemd / launchd unit restarts the binary.
Structs§
- Session
Schedule - Tunables for the session loop \u2014 dialed down in tests.
Enums§
- Session
Outcome - Outcome of a single session attempt. The reconnect loop decides whether to back off + retry based on the variant.
Functions§
- spawn_
ws_ session - Top-level driver: connect, run a session, reconnect on disconnect,
give up after
cfg.ws_reconnect_attemptsfailures.