Retrieves information about a specific docker host identified by its id.
(&self, docker_host_id: i32)
| 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> { |
no test coverage detected