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

Method ping

crates/openshell-driver-podman/src/client.rs:607–619  ·  view source on GitHub ↗

Ping the Podman API to verify connectivity.

(&self)

Source from the content-addressed store, hash-verified

605
606 /// Ping the Podman API to verify connectivity.
607 pub async fn ping(&self) -> Result<(), PodmanApiError> {
608 // _ping is outside the versioned API path.
609 let req = Self::build_request(hyper::Method::GET, "/_ping", Full::new(Bytes::new()), None);
610 let (status, _) = self.send_request(req, API_TIMEOUT).await?;
611 if status.is_success() {
612 Ok(())
613 } else {
614 Err(PodmanApiError::Api {
615 status: status.as_u16(),
616 message: "ping failed".to_string(),
617 })
618 }
619 }
620
621 /// Get system info.
622 pub async fn system_info(&self) -> Result<SystemInfo, PodmanApiError> {

Callers 3

newMethod · 0.45
connect_container_apiFunction · 0.45

Calls 1

send_requestMethod · 0.80

Tested by 1

connect_container_apiFunction · 0.36