Skip to main content

ConfiguredModule

Struct ConfiguredModule 

Source
pub struct ConfiguredModule {
Show 18 fields pub module_id: String, pub program: PathBuf, pub script: Option<ScriptEntry>, pub args: Vec<String>, pub env: Vec<(String, String)>, pub log: Option<LoggingConfig>, pub enabled: bool, pub registration_channel: bool, pub reserved: bool, pub reserved_prefixes: Vec<String>, pub protocol: ModuleProtocol, pub overlap: ModuleOverlap, pub carry_containment: bool, pub health: HealthConfig, pub drain_timeout_ms: Option<u64>, pub register_timeout: Duration, pub route_bind_relay_timeout_ms: Option<u64>, pub restart: RestartPolicy,
}

Fields§

§module_id: String§program: PathBuf§script: Option<ScriptEntry>

Bundled script content, read by the daemon and delivered from memory.

§args: Vec<String>§env: Vec<(String, String)>§log: Option<LoggingConfig>

Effective module logging policy. An absent module block inherits the daemon-wide logging block; when neither exists this stays absent so CK_LOG is genuinely absent from the service-manager-minimal child env.

§enabled: bool§registration_channel: bool

Approved support for the inherited registration channel. Absence is false; protocol-none children do not need a registration channel.

§reserved: bool

When true, only the daemon-spawned process for this module_id may register it: subc injects a one-time launch nonce on spawn and rejects any HELLO for this id whose nonce does not match. Protects security-boundary modules (e.g. the credential vault) from being impersonated by another key-holder while the real process is down or restarting. Defaults to false.

§reserved_prefixes: Vec<String>

Namespace prefixes owned by this reserved, supervised module. A HELLO for a module id under one of these prefixes must echo this owner module’s current spawn nonce.

§protocol: ModuleProtocol

Which wire protocol this module speaks, as declared. Absent in config means Subc, which is what every module written before this key meant.

§overlap: ModuleOverlap

Whether a second process of this module may run beside the first, which a blue/green swap does. Absent in config means exclusive.

§carry_containment: bool

Keep the current process container across module restarts. The value is fixed when a fresh container starts, not when an existing one is replaced.

§health: HealthConfig§drain_timeout_ms: Option<u64>

Effective drain budget (ms) for this module’s teardown, already resolved against the daemon-wide default at parse time. None = built-in default.

§register_timeout: Duration

First-HELLO budget for ordinary spawns. Resolved when supervision starts, like the restart policy; reload and swap use their own readiness budgets.

§route_bind_relay_timeout_ms: Option<u64>

Effective route.bind relay budget (ms) for this module, already resolved against the daemon-wide default at parse time. None = built-in default (12s). A 0 is refused at parse time at both layers — see DaemonConfig::route_bind_relay_timeout_ms and ROUTE_BIND_RELAY_ZERO_MESSAGE.

§restart: RestartPolicy

This module’s crash-restart budget, fully resolved at parse time: every absent key of the optional restart block falls back to the supervisor default (3 restarts per 600s, 100ms base backoff, 30s maximum backoff). Stored resolved rather than as an Option so no later layer has to re-derive the defaults and get them subtly different.

Read when a module STARTS being supervised (daemon start, or a rescan that adds the module). Legacy rescan reports an edit as pending until supervision next starts, not merely until the child respawns. The configuration approval path (SupervisorCommand::ApprovedConfiguration) reconciles approved module entries live instead of using legacy rescan.

Implementations§

Trait Implementations§

Source§

impl Clone for ConfiguredModule

Source§

fn clone(&self) -> Self

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

impl Debug for ConfiguredModule

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for ConfiguredModule

Source§

impl PartialEq for ConfiguredModule

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ConfiguredModule

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
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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<T> WithSubscriber for T

Source§

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

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

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