pub struct RuntimeCore { /* private fields */ }Expand description
Runtime adapter domain facade.
Wraps the backend and tracked instance state, exposes commands, status, events, and HTTP routes.
Implementations§
Source§impl RuntimeCore
impl RuntimeCore
Sourcepub fn new(config: RuntimeConfig) -> Self
pub fn new(config: RuntimeConfig) -> Self
Create a new RuntimeCore with the given configuration.
Sourcepub fn subscribe(&self) -> Receiver<RuntimeEvent>
pub fn subscribe(&self) -> Receiver<RuntimeEvent>
Subscribe to runtime events.
Sourcepub async fn status(&self) -> RuntimeStatus
pub async fn status(&self) -> RuntimeStatus
Get current status.
Sourcepub async fn list_instances(&self) -> Result<Vec<Instance>, RuntimeError>
pub async fn list_instances(&self) -> Result<Vec<Instance>, RuntimeError>
List all tracked instances.
Sourcepub async fn start_watching(
&self,
cancel: CancellationToken,
) -> Result<(), RuntimeError>
pub async fn start_watching( &self, cancel: CancellationToken, ) -> Result<(), RuntimeError>
Start watching the runtime backend for lifecycle events.
This spawns a background task that:
- Connects to the runtime backend
- Lists existing instances (reconciliation)
- Streams lifecycle events
- Updates tracked state and broadcasts events
Returns immediately. The background task runs until the cancel token fires.
Sourcepub async fn capability_status(&self) -> CapabilityStatus
pub async fn capability_status(&self) -> CapabilityStatus
Capability status for the unified status endpoint.
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeCore
impl !UnwindSafe for RuntimeCore
impl Freeze for RuntimeCore
impl Send for RuntimeCore
impl Sync for RuntimeCore
impl Unpin for RuntimeCore
impl UnsafeUnpin for RuntimeCore
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
Mutably borrows from an owned value. Read more