Common function to list containers
(docker: &Docker)
| 17 | |
| 18 | // Common function to list containers |
| 19 | async fn get_containers(docker: &Docker) -> Result<Vec<ContainerSummary>, String> { |
| 20 | let options = Some(ListContainersOptions::<String> { |
| 21 | all: true, |
| 22 | ..Default::default() |
| 23 | }); |
| 24 | |
| 25 | docker |
| 26 | .list_containers(options) |
| 27 | .await |
| 28 | .map_err(|e| e.to_string()) |
| 29 | } |
| 30 | |
| 31 | // Utility to extract projects from containers |
| 32 | fn extract_projects(containers: &[ContainerSummary]) -> HashSet<String> { |
no outgoing calls
no test coverage detected