pub struct RuntimeOwner { /* private fields */ }Expand description
Unique owner of the executor, supervisor, ledger, connectors, and shutdown state.
Implementations§
Source§impl RuntimeOwner
impl RuntimeOwner
Sourcepub fn state(&self) -> RuntimeState
pub fn state(&self) -> RuntimeState
Current lifecycle state.
Sourcepub fn ledger_len(&self) -> usize
pub fn ledger_len(&self) -> usize
Active ledger entry count.
Sourcepub fn owned_task_count(&self) -> u32
pub fn owned_task_count(&self) -> u32
Supervisor-owned task count (§22.3 stopped proof).
Sourcepub fn live_connector_owners(&self) -> u32
pub fn live_connector_owners(&self) -> u32
Live ConnectorOwner tasks (register-before-I/O; Hang-ready observation).
Sourcepub fn tool_spill_pending(&self) -> usize
pub fn tool_spill_pending(&self) -> usize
Runtime-scoped tool spill pending count (joins + orphans; §22.4 / Stopped gate).
Sourcepub fn global_reservations(&self) -> usize
pub fn global_reservations(&self) -> usize
Global reservation count.
Sourcepub fn channel_reservations(&self, channel: &ChannelId) -> usize
pub fn channel_reservations(&self, channel: &ChannelId) -> usize
Channel reservation count (D-040 rollback observability).
Sourcepub fn channel_count(&self) -> usize
pub fn channel_count(&self) -> usize
Number of realized channels owned by this runtime.
Sourcepub fn mcp_local_addr(&self) -> Option<SocketAddr>
pub fn mcp_local_addr(&self) -> Option<SocketAddr>
Bound MCP loopback address when enable_mcp_listener and the gateway is live.
Sourcepub fn mcp_gateway(&self) -> Option<McpGatewayHandle>
pub fn mcp_gateway(&self) -> Option<McpGatewayHandle>
Cloneable MCP gateway handle while the RuntimeService is live.
Sourcepub fn begin_shutdown(&self) -> ShutdownTicket
pub fn begin_shutdown(&self) -> ShutdownTicket
Begin shutdown (idempotent). Synchronously moves admission to Quiescing.
Control delivery is best-effort on the control queue; the supervisor also
observes Quiescing via an internal wake so a full control queue cannot
strand the runtime.
Sourcepub async fn wait_stopped(&mut self, deadline: Duration) -> ShutdownWaitOutcome
pub async fn wait_stopped(&mut self, deadline: Duration) -> ShutdownWaitOutcome
Wait until Stopped or the deadline elapses (v2: timeout ⇒ Quiescing, not false Stopped).
D-049: the deadline bounds the entire API — including the executor OS
thread join. Public Stopped is published only after that join.