Skip to main content

Module runtime_context

Module runtime_context 

Source
Expand description

Unified runtime context for RingKernel enterprise features.

This module provides a comprehensive runtime context that instantiates and manages all enterprise features (observability, health, multi-GPU, migration) based on the unified configuration.

ยงExample

โ“˜
use ringkernel_core::runtime_context::RuntimeBuilder;
use ringkernel_core::config::RingKernelConfig;

// Create runtime with default configuration
let runtime = RuntimeBuilder::new()
    .with_config(RingKernelConfig::production())
    .build()?;

// Access enterprise features
let health = runtime.health_checker();
let metrics = runtime.prometheus_exporter();
let coordinator = runtime.multi_gpu_coordinator();

// Graceful shutdown
runtime.shutdown().await?;

Structsยง

AppInfo
Application information.
BackgroundTaskStatus
Status of background tasks.
BackgroundTasks ๐Ÿ”’
Background task tracking.
CircuitGuard
Guard for executing operations with circuit breaker protection.
ContextMetrics
Context metrics for monitoring the unified runtime.
DegradationGuard
Guard for graceful degradation.
HealthCycleResult
Result of a health check cycle run by the runtime context.
MonitoringConfig
Configuration for background monitoring loops.
MonitoringHandles
Handles for background monitoring tasks.
RingKernelContext
Unified runtime context managing all enterprise features.
RuntimeBuilder
Builder for RingKernelContext.
RuntimeStats ๐Ÿ”’
Runtime statistics (atomic counters).
RuntimeStatsSnapshot
Snapshot of runtime statistics.
ShutdownReport
Report generated after shutdown completes.
WatchdogResult
Result of a watchdog scan cycle.

Enumsยง

LifecycleState
State of the runtime lifecycle.
OperationPriority
Operation priority for load shedding decisions.