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

Function gateway_to_json

crates/openshell-cli/src/run.rs:1394–1404  ·  view source on GitHub ↗
(gateway: &ListedGateway, active: &Option<String>)

Source from the content-addressed store, hash-verified

1392}
1393
1394fn gateway_to_json(gateway: &ListedGateway, active: &Option<String>) -> serde_json::Value {
1395 let metadata = &gateway.metadata;
1396 serde_json::json!({
1397 "name": metadata.name,
1398 "endpoint": metadata.gateway_endpoint,
1399 "type": gateway_type_label(metadata),
1400 "source": gateway.source.label(),
1401 "auth": gateway_auth_label(metadata),
1402 "active": active.as_deref() == Some(&metadata.name),
1403 })
1404}
1405
1406async fn http_health_check(server: &str, tls: &TlsOptions) -> Result<Option<StatusCode>> {
1407 let base = server.trim_end_matches('/');

Callers 2

gateway_listFunction · 0.85

Calls

no outgoing calls

Tested by 1