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

Function podman_socket_responds

crates/openshell-core/src/config.rs:242–246  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

240
241#[cfg(unix)]
242fn podman_socket_responds(path: &Path) -> bool {
243 unix_socket_http_ping(path, |response| {
244 http_response_is_success(response) && contains_ascii(response, b"Libpod-Api-Version:")
245 })
246}
247
248#[cfg(unix)]
249fn unix_socket_http_ping(path: &Path, accepts_response: impl FnOnce(&[u8]) -> bool) -> bool {

Callers 1

is_podman_availableFunction · 0.85

Calls 3

unix_socket_http_pingFunction · 0.85
http_response_is_successFunction · 0.85
contains_asciiFunction · 0.85

Tested by

no test coverage detected