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

Function update_indexes

crates/openshell-driver-kubernetes/src/driver.rs:901–914  ·  view source on GitHub ↗
(
    sandbox_name_to_id: &mut std::collections::HashMap<String, String>,
    agent_pod_to_id: &mut std::collections::HashMap<String, String>,
    sandbox: &Sandbox,
)

Source from the content-addressed store, hash-verified

899}
900
901fn update_indexes(
902 sandbox_name_to_id: &mut std::collections::HashMap<String, String>,
903 agent_pod_to_id: &mut std::collections::HashMap<String, String>,
904 sandbox: &Sandbox,
905) {
906 if !sandbox.name.is_empty() {
907 sandbox_name_to_id.insert(sandbox.name.clone(), sandbox.id.clone());
908 }
909 if let Some(status) = sandbox.status.as_ref()
910 && !status.instance_id.is_empty()
911 {
912 agent_pod_to_id.insert(status.instance_id.clone(), sandbox.id.clone());
913 }
914}
915
916fn remove_indexes(
917 sandbox_name_to_id: &mut std::collections::HashMap<String, String>,

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected