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

Function docker_pids_limit

crates/openshell-driver-docker/src/lib.rs:2671–2682  ·  view source on GitHub ↗
(value: i64)

Source from the content-addressed store, hash-verified

2669}
2670
2671fn docker_pids_limit(value: i64) -> Result<Option<i64>, Status> {
2672 if value < 0 {
2673 return Err(Status::failed_precondition(
2674 "docker sandbox_pids_limit must be zero or greater",
2675 ));
2676 }
2677 if value == 0 {
2678 Ok(None)
2679 } else {
2680 Ok(Some(value))
2681 }
2682}
2683
2684#[allow(clippy::cast_possible_truncation)]
2685fn parse_cpu_limit(value: &str) -> Result<Option<i64>, Status> {

Calls

no outgoing calls

Tested by

no test coverage detected