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

Function list_gateways

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

List all gateways that have stored metadata. Scans `$XDG_CONFIG_HOME/openshell/gateways/` and the system registry under `/etc/openshell/gateways/` (or `OPENSHELL_SYSTEM_GATEWAY_DIR/gateways/` when set). Per-user entries shadow system entries on name collision.

()

Source from the content-addressed store, hash-verified

381/// `/etc/openshell/gateways/` (or `OPENSHELL_SYSTEM_GATEWAY_DIR/gateways/`
382/// when set). Per-user entries shadow system entries on name collision.
383pub fn list_gateways() -> Result<Vec<GatewayMetadata>> {
384 Ok(list_gateways_with_source()?
385 .into_iter()
386 .map(|gateway| gateway.metadata)
387 .collect())
388}
389
390/// Remove the active gateway file (used when destroying the active gateway).
391pub fn clear_active_gateway() -> Result<()> {

Callers 3

find_gateway_by_endpointFunction · 0.85
complete_gateway_namesFunction · 0.85
gateway_select_withFunction · 0.85

Calls 1

Tested by

no test coverage detected