Skip to main content

remove_mesh_if_idle

Function remove_mesh_if_idle 

Source
pub async fn remove_mesh_if_idle(
    engine: &dyn ComposeEngine,
    network: &str,
    members: &BTreeSet<String>,
) -> Result<bool>
Expand description

Remove the shared network once none of members is known to Docker any more; returns whether it was removed.

Compose labels a network with the project that created it, so no member’s down removes a network others joined: whoever stops the last member calls this.