Skip to main content

Module supervisor

Module supervisor 

Source
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§

AgentSpec
TmuxSupervisor
Portable supervisor: one detached tmux session per agent.

Enums§

AgentState
Observed state of an agent’s supervising process.
DrainOutcome
Outcome of a graceful drain. Graceful means the agent observed Stopped before the timeout elapsed; TimedOutKilled means the poll fell through and down() 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§

Supervisor

Functions§

orchestrate_drain
Generic graceful-drain orchestration used by Supervisor impls that have a “signal a graceful stop” primitive (e.g. tmux’s send-keys C-c). Calls signal_fn, polls supervisor.state(spec) for Stopped up to timeout at the supervisor’s drain_poll_interval, falls through to supervisor.down(spec) if the agent doesn’t exit in time.