MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / load_active_gateway

Function load_active_gateway

crates/openshell-bootstrap/src/metadata.rs:273–275  ·  view source on GitHub ↗

Load the active gateway name from persistent storage. Returns `None` if no active gateway has been set. Falls back to the system-level active gateway file when no per-user selection exists, so installer-provided defaults can take effect on a fresh system.

()

Source from the content-addressed store, hash-verified

271/// system-level active gateway file when no per-user selection exists, so
272/// installer-provided defaults can take effect on a fresh system.
273pub fn load_active_gateway() -> Option<String> {
274 load_user_active_gateway().or_else(|| read_gateway_name(&system_active_gateway_path()))
275}
276
277/// Save the last-used sandbox name for a gateway to persistent storage.
278pub fn save_last_sandbox(gateway: &str, sandbox: &str) -> Result<()> {

Callers 2

find_gateway_by_endpointFunction · 0.85

Calls 3

load_user_active_gatewayFunction · 0.85
read_gateway_nameFunction · 0.85

Tested by

no test coverage detected