pub trait Supervisor { // Required methods fn up(&self, spec: &AgentSpec) -> Result<()>; fn down(&self, spec: &AgentSpec) -> Result<()>; fn state(&self, spec: &AgentSpec) -> Result<AgentState>; // Provided method fn drain( &self, spec: &AgentSpec, _timeout: Duration, ) -> Result<DrainOutcome> { ... } }
Stop an agent gracefully. The default implementation falls back to down() for back-ends that don’t implement signal delivery (or where graceful shutdown isn’t meaningful — e.g. a MockSupervisor in tests).
down()
MockSupervisor