pub struct KernelRuntime { /* private fields */ }Expand description
The main RustKernels runtime
Implementations§
Source§impl KernelRuntime
impl KernelRuntime
Sourcepub fn new(config: RuntimeConfig) -> Self
pub fn new(config: RuntimeConfig) -> Self
Create a new runtime with the given configuration
Sourcepub fn builder() -> RuntimeBuilder
pub fn builder() -> RuntimeBuilder
Create a runtime builder
Sourcepub fn registry(&self) -> &Arc<KernelRegistry>
pub fn registry(&self) -> &Arc<KernelRegistry>
Get the kernel registry
Sourcepub fn config(&self) -> &RuntimeConfig
pub fn config(&self) -> &RuntimeConfig
Get the current configuration
Sourcepub async fn state(&self) -> LifecycleState
pub async fn state(&self) -> LifecycleState
Get current lifecycle state
Sourcepub fn on_event(&mut self, callback: RuntimeEventCallback)
pub fn on_event(&mut self, callback: RuntimeEventCallback)
Add an event callback
Sourcepub async fn start(&mut self) -> Result<RuntimeHandle>
pub async fn start(&mut self) -> Result<RuntimeHandle>
Start the runtime
Sourcepub async fn force_shutdown(&mut self) -> Result<()>
pub async fn force_shutdown(&mut self) -> Result<()>
Force immediate shutdown (not graceful)
Sourcepub async fn reload_config(&mut self, new_config: RuntimeConfig) -> Result<()>
pub async fn reload_config(&mut self, new_config: RuntimeConfig) -> Result<()>
Reload configuration (if hot reload enabled)
Sourcepub fn shutdown_signal(&self) -> ShutdownSignal
pub fn shutdown_signal(&self) -> ShutdownSignal
Get a shutdown signal receiver
Sourcepub fn stats(&self) -> RuntimeStats
pub fn stats(&self) -> RuntimeStats
Get runtime statistics
Sourcepub fn record_message_start(&self)
pub fn record_message_start(&self)
Record a message being processed
Sourcepub fn record_message_complete(&self)
pub fn record_message_complete(&self)
Record a message completed
Sourcepub fn record_kernel_registered(&self, id: &str)
pub fn record_kernel_registered(&self, id: &str)
Record kernel registration
Sourcepub fn record_kernel_activated(&self)
pub fn record_kernel_activated(&self)
Record kernel activation
Sourcepub fn record_kernel_deactivated(&self, id: &str)
pub fn record_kernel_deactivated(&self, id: &str)
Record kernel deactivation
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KernelRuntime
impl !RefUnwindSafe for KernelRuntime
impl Send for KernelRuntime
impl Sync for KernelRuntime
impl Unpin for KernelRuntime
impl !UnwindSafe for KernelRuntime
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.