pub struct RuntimeHandle { /* private fields */ }Expand description
Cloneable handle to the runtime.
Provides the same control surface as Runtime — add/remove feeds,
subscribe to health and output events, and trigger shutdown.
Obtain via Runtime::handle().
Implementations§
Source§impl RuntimeHandle
impl RuntimeHandle
Sourcepub fn feed_count(&self) -> Result<usize, NvError>
pub fn feed_count(&self) -> Result<usize, NvError>
Number of currently active feeds.
Sourcepub fn uptime(&self) -> Duration
pub fn uptime(&self) -> Duration
Elapsed time since the runtime was created.
Monotonically increasing. Useful for uptime dashboards and health checks.
Sourcepub fn diagnostics(&self) -> Result<RuntimeDiagnostics, NvError>
pub fn diagnostics(&self) -> Result<RuntimeDiagnostics, NvError>
Get a consolidated diagnostics snapshot of the runtime and all feeds.
See Runtime::diagnostics() for details.
Sourcepub fn health_subscribe(&self) -> Receiver<HealthEvent>
pub fn health_subscribe(&self) -> Receiver<HealthEvent>
Subscribe to aggregate health events from all feeds.
Sourcepub fn output_subscribe(&self) -> Receiver<SharedOutput>
pub fn output_subscribe(&self) -> Receiver<SharedOutput>
Subscribe to aggregate output from all feeds.
Bounded by the configured output_capacity. Slow subscribers
receive RecvError::Lagged. Channel saturation is reported via
HealthEvent::OutputLagged (sentinel-observed, not
per-subscriber loss).
Sourcepub fn add_feed(&self, config: FeedConfig) -> Result<FeedHandle, NvError>
pub fn add_feed(&self, config: FeedConfig) -> Result<FeedHandle, NvError>
Sourcepub fn create_batch(
&self,
processor: Box<dyn BatchProcessor>,
config: BatchConfig,
) -> Result<BatchHandle, NvError>
pub fn create_batch( &self, processor: Box<dyn BatchProcessor>, config: BatchConfig, ) -> Result<BatchHandle, NvError>
Create a shared batch coordinator.
See Runtime::create_batch() for details.
Trait Implementations§
Source§impl Clone for RuntimeHandle
impl Clone for RuntimeHandle
Source§fn clone(&self) -> RuntimeHandle
fn clone(&self) -> RuntimeHandle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RuntimeHandle
impl !RefUnwindSafe for RuntimeHandle
impl Send for RuntimeHandle
impl Sync for RuntimeHandle
impl Unpin for RuntimeHandle
impl UnsafeUnpin for RuntimeHandle
impl !UnwindSafe for RuntimeHandle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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