Skip to main content

CtlRequest

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.

Fields

§spec: SpawnSpec

Spec describing the agent to create.

§

Attach

Return the dedicated socket for an agent so the caller can attach.

Fields

§id: String

Target agent.

§

Kill

Terminate an agent (SIGTERM, escalating to SIGKILL after the configured grace).

Fields

§id: String

Target agent.

§

Respawn

Kill + re-spawn with the same spec.

Fields

§id: String

Target agent.

§

Rm

Remove an agent from the registry (must already be stopped unless force is set).

Fields

§id: String

Target agent.

§force: bool

Force-remove even if the agent is still running.

§

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

§grace_secs: u64

Budget, in seconds, within which a worker is expected to flush and exit after SIGTERM (the graceful window; no forced SIGKILL here).

§

ReportStatus

A worker reports a lifecycle transition (Running <-> Idle) for itself.

Fields

§id: String

Reporting agent.

§status: AgentStatus

New status (only Running/Idle are honored; see registry guard).

Trait Implementations§

§

impl Clone for CtlRequest

§

fn clone(&self) -> CtlRequest

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for CtlRequest

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for CtlRequest

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<CtlRequest, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Serialize for CtlRequest

§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more