Utility to extract projects from containers
(containers: &[ContainerSummary])
| 30 | |
| 31 | // Utility to extract projects from containers |
| 32 | fn extract_projects(containers: &[ContainerSummary]) -> HashSet<String> { |
| 33 | containers |
| 34 | .iter() |
| 35 | .filter_map(|container| { |
| 36 | container |
| 37 | .labels |
| 38 | .as_ref() |
| 39 | .and_then(|labels| labels.get("com.docker.compose.project").cloned()) |
| 40 | }) |
| 41 | .collect() |
| 42 | } |
| 43 | |
| 44 | #[command] |
| 45 | pub async fn list_stacks(include_inactive: bool) -> Result<Vec<String>, String> { |
no outgoing calls
no test coverage detected