Skip to main content

Module runtime

Module runtime 

Source
Expand description

Runtime lifecycle, concurrency, and resource governance (JOE-1573).

Modules:

  • op_context — per-operation cancel/deadline/progress
  • governor — process/engine admission permits and overload policy
  • singleflight — per-key load coalescing
  • registry — weighted model residency and eviction
  • lifecycle — Running → ShuttingDown → Stopped (for FFI / process)

§Profiles

GovernorConfig::default is a conservative desktop profile. Use GovernorConfig::mobile or GovernorConfig::server for known deployments. Process-global defaults live on ResourceGovernor::process_global.

Re-exports§

pub use governor::GovernorConfig;
pub use governor::GovernorStats;
pub use governor::PermitKind;
pub use governor::ResourceGovernor;
pub use governor::ResourcePermit;
pub use lifecycle::AdmissionError;
pub use lifecycle::Lifecycle;
pub use lifecycle::LifecycleState;
pub use lifecycle::OpAdmission;
pub use lifecycle::ShutdownError;
pub use op_context::OpContext;
pub use op_context::OpProgress;
pub use op_context::ProgressSink;
pub use registry::ModelRegistry;
pub use registry::RegistryConfig;
pub use registry::RegistryEntry;
pub use registry::RegistryPin;
pub use registry::RegistrySnapshot;
pub use registry::ResidencyWeight;
pub use singleflight::BeginLoad;
pub use singleflight::LeaderGuard;
pub use singleflight::LoadKey;
pub use singleflight::Singleflight;

Modules§

governor
Process/engine resource governor and overload policy (JOE-1596).
lifecycle
Synchronized lifecycle: Running → ShuttingDown → Stopped (JOE-1594).
op_context
Per-operation control context (JOE-1595).
registry
Weighted model residency and eviction (JOE-1598).
singleflight
Per-key singleflight loading (JOE-1597).