MCPcopy Index your code
hub / github.com/docker/cli / getServicesDeclaredNetworks

Function getServicesDeclaredNetworks

cli/command/stack/deploy_composefile.go:76–88  ·  view source on GitHub ↗
(serviceConfigs []composetypes.ServiceConfig)

Source from the content-addressed store, hash-verified

74}
75
76func getServicesDeclaredNetworks(serviceConfigs []composetypes.ServiceConfig) map[string]struct{} {
77 serviceNetworks := map[string]struct{}{}
78 for _, serviceConfig := range serviceConfigs {
79 if len(serviceConfig.Networks) == 0 {
80 serviceNetworks["default"] = struct{}{}
81 continue
82 }
83 for nw := range serviceConfig.Networks {
84 serviceNetworks[nw] = struct{}{}
85 }
86 }
87 return serviceNetworks
88}
89
90func validateExternalNetworks(ctx context.Context, apiClient client.NetworkAPIClient, externalNetworks []string) error {
91 for _, networkName := range externalNetworks {

Callers 1

deployComposeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…