mod global#

module global#

Process-global access to the shared runtime context state.

The public API layer uses this module to resolve the single NemoFlowContextState instance 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 NemoFlowContextState on first use and returns a cloned Arc handle to the same underlying RwLock on every subsequent call.

Returns

An Arc pointing at the singleton RwLock that 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.