MCPcopy Create free account
hub / github.com/BigBoot/AutoKuma / get_docker_host

Method get_docker_host

kuma-client/src/client.rs:1683–1690  ·  view source on GitHub ↗

Retrieves information about a specific docker host identified by its id.

(&self, docker_host_id: i32)

Source from the content-addressed store, hash-verified

1681
1682 /// Retrieves information about a specific docker host identified by its id.
1683 pub async fn get_docker_host(&self, docker_host_id: i32) -> Result<DockerHost> {
1684 self.get_docker_hosts().await.and_then(|docker_host| {
1685 docker_host
1686 .into_iter()
1687 .find(|docker_host| docker_host.id == Some(docker_host_id))
1688 .ok_or_else(|| Error::IdNotFound("Docker Host".to_owned(), docker_host_id))
1689 })
1690 }
1691
1692 /// Adds a new docker host to Uptime Kuma.
1693 pub async fn add_docker_host(&self, mut docker_host: DockerHost) -> Result<DockerHost> {

Callers 1

handleFunction · 0.80

Calls 1

get_docker_hostsMethod · 0.45

Tested by

no test coverage detected