github.com/Heebron/moby@v0.0.0-20221111184709-6eab4f55faf7/libnetwork/drivers_ipam.go (about) 1 package libnetwork 2 3 import ( 4 "github.com/docker/docker/libnetwork/drvregistry" 5 "github.com/docker/docker/libnetwork/ipamapi" 6 builtinIpam "github.com/docker/docker/libnetwork/ipams/builtin" 7 nullIpam "github.com/docker/docker/libnetwork/ipams/null" 8 remoteIpam "github.com/docker/docker/libnetwork/ipams/remote" 9 "github.com/docker/docker/libnetwork/ipamutils" 10 ) 11 12 func initIPAMDrivers(r *drvregistry.DrvRegistry, lDs, gDs interface{}, addressPool []*ipamutils.NetworkToSplit) error { 13 builtinIpam.SetDefaultIPAddressPool(addressPool) 14 for _, fn := range [](func(ipamapi.Callback, interface{}, interface{}) error){ 15 builtinIpam.Init, 16 remoteIpam.Init, 17 nullIpam.Init, 18 } { 19 if err := fn(r, lDs, gDs); err != nil { 20 return err 21 } 22 } 23 24 return nil 25 }