mod global#
- module global#
Process-global access to the shared runtime context state.
The public API layer uses this module to resolve the single
NemoFlowContextStateinstance that owns middleware registrations and runtime extensions for the current process.Functions
- fn global_context() -> Arc<RwLock<NemoFlowContextState>>#
Return the process-global runtime context state handle.
This lazily initializes the shared
NemoFlowContextStateon first use and returns a clonedArchandle to the same underlyingRwLockon every subsequent call.Returns
An
Arcpointing at the singletonRwLockthat stores the runtime context state for the current process.Notes
All callers share the same underlying state. Mutations made through one handle are visible through every other handle returned by this function.