pub struct OmegaRuntime { /* private fields */ }Expand description
Main runtime orchestrator for the Omega system
Implementations§
Source§impl OmegaRuntime
impl OmegaRuntime
Sourcepub async fn new(config: OmegaConfig) -> RuntimeResult<Self>
pub async fn new(config: OmegaConfig) -> RuntimeResult<Self>
Create a new OmegaRuntime instance
Sourcepub async fn start(&self) -> RuntimeResult<()>
pub async fn start(&self) -> RuntimeResult<()>
Start the runtime and all subsystems
Sourcepub async fn stop(&self) -> RuntimeResult<()>
pub async fn stop(&self) -> RuntimeResult<()>
Stop the runtime and shutdown all subsystems
Sourcepub async fn pause(&self) -> RuntimeResult<()>
pub async fn pause(&self) -> RuntimeResult<()>
Pause the runtime
Sourcepub async fn resume(&self) -> RuntimeResult<()>
pub async fn resume(&self) -> RuntimeResult<()>
Resume the runtime from paused state
Sourcepub fn memory(&self) -> &CosmicMemory
pub fn memory(&self) -> &CosmicMemory
Get reference to Memory system
Sourcepub fn loops(&self) -> &LoopEngine
pub fn loops(&self) -> &LoopEngine
Get reference to Loop engine
Sourcepub fn config(&self) -> &OmegaConfig
pub fn config(&self) -> &OmegaConfig
Get the current runtime configuration
Sourcepub fn state(&self) -> RuntimeState
pub fn state(&self) -> RuntimeState
Get the current runtime state
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if runtime is running
Sourcepub fn on_event(&self, handler: EventHandler)
pub fn on_event(&self, handler: EventHandler)
Register an event handler
Sourcepub fn event_history(&self) -> Vec<OmegaEvent>
pub fn event_history(&self) -> Vec<OmegaEvent>
Get event history
Sourcepub fn clear_event_history(&self)
pub fn clear_event_history(&self)
Clear event history
Sourcepub async fn health(&self) -> RuntimeHealth
pub async fn health(&self) -> RuntimeHealth
Get runtime health status
Auto Trait Implementations§
impl Freeze for OmegaRuntime
impl !RefUnwindSafe for OmegaRuntime
impl Send for OmegaRuntime
impl Sync for OmegaRuntime
impl Unpin for OmegaRuntime
impl !UnwindSafe for OmegaRuntime
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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