pub struct ControlHandler { /* private fields */ }Expand description
Real channel-0 control handler for subc itself.
Implementations§
Source§impl ControlHandler
impl ControlHandler
pub fn new(registry: Arc<Registry>) -> Self
pub fn with_forwarding( registry: Arc<Registry>, forwarding: Arc<ForwardingTable>, ) -> Self
Sourcepub fn with_storage_config(self, storage_config: Option<StorageConfig>) -> Self
pub fn with_storage_config(self, storage_config: Option<StorageConfig>) -> Self
Set the central storage policy: registering modules then receive their resolved storage descriptor in HELLO_ACK.
Sourcepub fn with_admission_facts_config(
self,
carrier_module_id: Option<String>,
targets: Option<Vec<String>>,
) -> Self
pub fn with_admission_facts_config( self, carrier_module_id: Option<String>, targets: Option<Vec<String>>, ) -> Self
Configure the exact reserved module and target ids permitted to relay opaque admission facts. Config-file loading validates this authority; this builder keeps the same policy available to embedded test daemons.
Sourcepub fn with_route_bind_relay_timeout(self, timeout: Duration) -> Self
pub fn with_route_bind_relay_timeout(self, timeout: Duration) -> Self
Override the route.bind relay timeout. Used by tests that assert the timeout path so they don’t block on the production-safe default.
Sourcepub fn with_route_bind_relay_timeouts(
self,
timeouts: impl IntoIterator<Item = (String, Duration)>,
) -> Self
pub fn with_route_bind_relay_timeouts( self, timeouts: impl IntoIterator<Item = (String, Duration)>, ) -> Self
Install per-module route.bind relay budget overrides. A module id
listed here wins over the daemon-wide default set via
with_route_bind_relay_timeout. Values are pre-resolved at parse time
from subc.jsonc (per-module > daemon-wide > absent), so callers pass
the same Duration the bind path will use.
Sourcepub fn route_bind_relay_timeout_for(&self, module_id: &str) -> Duration
pub fn route_bind_relay_timeout_for(&self, module_id: &str) -> Duration
Resolve the route.bind relay budget for a specific target module id.
Per-module overrides win; the daemon-wide value (set via
with_route_bind_relay_timeout or the built-in default) is the
fallback. Exposed so config-aware callers (bootstrap, tests) can audit
the same resolution handle_route_open will use.
Sourcepub fn with_route_bind_breaker(self, threshold: u32, cooldown: Duration) -> Self
pub fn with_route_bind_breaker(self, threshold: u32, cooldown: Duration) -> Self
Override the per-module bind-relay breaker policy.
Used by tests, which cannot spend three production budgets opening a
breaker or twenty seconds waiting for its cooldown. The production
values are DEFAULT_ROUTE_BIND_BREAKER_THRESHOLD and
DEFAULT_ROUTE_BIND_BREAKER_COOLDOWN, whose doc comments carry the
reasoning for the numbers.
pub fn with_process_liveness( self, process_liveness: Arc<dyn ModuleProcessLiveness>, ) -> Self
pub fn with_supervisor(self, supervisor: SupervisorHandle) -> Self
pub fn with_daemon_provenance( self, pid: u32, started_at_ms: u64, executable_path: Option<PathBuf>, build_git_sha: Option<String>, build_lock_digest: Option<String>, ) -> Self
Sourcepub fn with_capability_config(
self,
modules: impl IntoIterator<Item = (String, bool)>,
reserved_capabilities: BTreeMap<String, String>,
) -> Self
pub fn with_capability_config( self, modules: impl IntoIterator<Item = (String, bool)>, reserved_capabilities: BTreeMap<String, String>, ) -> Self
Install the configured module set and its reserved capability bindings. Bindings are configuration-scoped and may point at a provider that has not been installed yet, so this does not require the bound module to exist.
pub fn with_supervisor_rescan( self, supervisor: Supervisor, config_path: impl Into<PathBuf>, configured_port: Option<u16>, ) -> Self
pub fn with_connected_clients(self, connected_clients: ConnectedClients) -> Self
pub fn forwarding(&self) -> Arc<ForwardingTable> ⓘ
Sourcepub fn spawn_capability_deadline_loop(self: Arc<Self>)
pub fn spawn_capability_deadline_loop(self: Arc<Self>)
Wake at each candidate’s own deadline so a stalled fresh exec emits its requirement event without depending on an operator polling a status command.