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

Function parse_gateway_metadata

crates/openshell-bootstrap/src/metadata.rs:122–129  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

120}
121
122fn parse_gateway_metadata(path: &Path) -> Result<GatewayMetadata> {
123 let contents = std::fs::read_to_string(path)
124 .into_diagnostic()
125 .wrap_err_with(|| format!("failed to read metadata from {}", path.display()))?;
126 serde_json::from_str(&contents)
127 .into_diagnostic()
128 .wrap_err("failed to parse gateway metadata")
129}
130fn user_entry_shadows_system(metadata_path: &Path) -> bool {
131 metadata_path.try_exists().unwrap_or(true)
132}

Callers 2

load_gateway_metadataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected