Enum CtlRequest
pub enum CtlRequest {
List,
Spawn {
spec: SpawnSpec,
},
Attach {
id: String,
},
Kill {
id: String,
},
Respawn {
id: String,
},
Rm {
id: String,
force: bool,
},
Status,
Shutdown,
Drain {
grace_secs: u64,
},
ReportStatus {
id: String,
status: AgentStatus,
},
}Expand description
Control-plane requests from the CLI / parent agent to the daemon.
Variants§
List
List all registered agents.
Spawn
Register and start a new agent.
Attach
Return the dedicated socket for an agent so the caller can attach.
Kill
Terminate an agent (SIGTERM, escalating to SIGKILL after the configured grace).
Respawn
Kill + re-spawn with the same spec.
Rm
Remove an agent from the registry (must already be stopped unless
force is set).
Status
Daemon health probe.
Shutdown
Ask the daemon to mark itself for shutdown after the current in-flight requests complete.
Drain
Gracefully drain + checkpoint every live agent before teardown/pause
(#650, ADR 0057): each live worker is SIGTERM’d (not SIGKILL’d) so it
flushes and exits cleanly within grace_secs, and its session directory
is returned as a resume reference. Distinct from Kill (abrupt, one
agent). Used by the operator drain finalizer + idle-pause reconcile.
Fields
ReportStatus
A worker reports a lifecycle transition (Running <-> Idle) for itself.
Fields
status: AgentStatusNew status (only Running/Idle are honored; see registry guard).
Trait Implementations§
§impl Clone for CtlRequest
impl Clone for CtlRequest
§fn clone(&self) -> CtlRequest
fn clone(&self) -> CtlRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for CtlRequest
impl Debug for CtlRequest
§impl<'de> Deserialize<'de> for CtlRequest
impl<'de> Deserialize<'de> for CtlRequest
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CtlRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CtlRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Serialize for CtlRequest
impl Serialize for CtlRequest
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for CtlRequest
impl RefUnwindSafe for CtlRequest
impl Send for CtlRequest
impl Sync for CtlRequest
impl Unpin for CtlRequest
impl UnsafeUnpin for CtlRequest
impl UnwindSafe for CtlRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more