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

Function platform_config_bool

crates/openshell-driver-kubernetes/src/driver.rs:2101–2108  ·  view source on GitHub ↗
(template: &SandboxTemplate, key: &str)

Source from the content-addressed store, hash-verified

2099}
2100
2101fn platform_config_bool(template: &SandboxTemplate, key: &str) -> Option<bool> {
2102 let config = template.platform_config.as_ref()?;
2103 let value = config.fields.get(key)?;
2104 match value.kind.as_ref() {
2105 Some(prost_types::value::Kind::BoolValue(b)) => Some(*b),
2106 _ => None,
2107 }
2108}
2109
2110/// Extract a nested Struct value from the template's `platform_config`,
2111/// converting it to `serde_json::Value`.

Calls 1

getMethod · 0.45

Tested by

no test coverage detected