Expand description
Local control channel of this node (POST /control/{drain,reload,handoff}
on the ops HTTP listener). Owner-only: a random bearer token written 0600
(Unix) into the node’s own state directory, a per-user location on Windows.
/health publishes the token file path and the capabilities, never the token.
- drain: mark the node draining (reported in
/health); new work is the caller’s to stop sending.?draining=falseclears it. - reload: no hot-reloadable config yet; answers what needs a handoff.
- handoff: drain, answer 202, then after
release_after_msstop the ops listener, which runs the node’s normal graceful shutdown (its own PTY sessions stop; nothing it did not spawn is touched) and frees every port for the successor.
Constants§
Functions§
- authorized
- cleanup
- Remove our token file at exit if it is still ours.
- execute
- Execute a verb. Returns (status, JSON body).
- handoff_
requested - Resolves when a handoff asked the ops listener to stop.
- install
- Create the token and write it owner-only. Call once at start.
- installed
- is_
draining - token_
file - token_
file_ for - Token file beside the node state.
- write_
owner_ only