MCPcopy Create free account
hub / github.com/codename-co/stack / extract_projects

Function extract_projects

packages/app/src-tauri/src/docker.rs:32–42  ·  view source on GitHub ↗

Utility to extract projects from containers

(containers: &[ContainerSummary])

Source from the content-addressed store, hash-verified

30
31// Utility to extract projects from containers
32fn 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]
45pub async fn list_stacks(include_inactive: bool) -> Result<Vec<String>, String> {

Callers 2

list_stacksFunction · 0.85
docker_eventsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected