Expand description
Process supervision.
The default back-end is a portable TmuxSupervisor that works on macOS
and Linux. SystemdSupervisor and LaunchdSupervisor plug in behind
the same trait when the host supports them.
Structs§
- Agent
Spec - Tmux
Supervisor - Portable supervisor: one detached
tmuxsession per agent.
Enums§
- Agent
State - Observed state of an agent’s supervising process.
- Drain
Outcome - Outcome of a graceful drain.
Gracefulmeans the agent observedStoppedbefore the timeout elapsed;TimedOutKilledmeans the poll fell through anddown()was used as a hard stop. Surfaced to the caller so reload can annotate which agents were forcibly killed — operator signal that a drain budget needs tuning.
Traits§
Functions§
- orchestrate_
drain - Generic graceful-drain orchestration used by
Supervisorimpls that have a “signal a graceful stop” primitive (e.g. tmux’ssend-keys C-c). Callssignal_fn, pollssupervisor.state(spec)forStoppedup totimeoutat the supervisor’sdrain_poll_interval, falls through tosupervisor.down(spec)if the agent doesn’t exit in time.