MCPcopy
hub / github.com/docker/compose / planCreateNetwork

Method planCreateNetwork

pkg/compose/reconcile.go:172–182  ·  view source on GitHub ↗

planCreateNetwork adds a single CreateNetwork node and records it for dependency tracking.

(key string, nw *types.NetworkConfig)

Source from the content-addressed store, hash-verified

170
171// planCreateNetwork adds a single CreateNetwork node and records it for dependency tracking.
172func (r *reconciler) planCreateNetwork(key string, nw *types.NetworkConfig) *PlanNode {
173 node := r.plan.addNode(Operation{
174 Type: OpCreateNetwork,
175 ResourceID: fmt.Sprintf("network:%s", key),
176 Cause: "not found",
177 Name: nw.Name,
178 Network: nw,
179 }, "")
180 r.networkNodes[key] = node
181 return node
182}
183
184// planRecreateNetwork adds the full sequence for a diverged network:
185// stop affected containers → disconnect → remove network → create network.

Callers 1

reconcileNetworksMethod · 0.95

Calls 1

addNodeMethod · 0.80

Tested by

no test coverage detected