package ipamutils
import "github.com/docker/docker/libnetwork/ipamutils"
Package ipamutils provides utility functions for ipam management
Index ¶
- func ConfigGlobalScopeDefaultNetworks(defaultAddressPool []*NetworkToSplit) error
- func GetGlobalScopeDefaultNetworks() []*net.IPNet
- func GetLocalScopeDefaultNetworks() []*net.IPNet
- func SplitNetworks(list []*NetworkToSplit) ([]*net.IPNet, error)
- type NetworkToSplit
Functions ¶
func ConfigGlobalScopeDefaultNetworks ¶
func ConfigGlobalScopeDefaultNetworks(defaultAddressPool []*NetworkToSplit) error
ConfigGlobalScopeDefaultNetworks configures global default pool. Ideally this will be called from SwarmKit as part of swarm init
func GetGlobalScopeDefaultNetworks ¶
GetGlobalScopeDefaultNetworks returns a copy of the global-sopce network list.
func GetLocalScopeDefaultNetworks ¶
GetLocalScopeDefaultNetworks returns a copy of the default local-scope network list.
func SplitNetworks ¶
func SplitNetworks(list []*NetworkToSplit) ([]*net.IPNet, error)
SplitNetworks takes a slice of networks, split them accordingly and returns them
Types ¶
type NetworkToSplit ¶
NetworkToSplit represent a network that has to be split in chunks with mask length Size. Each subnet in the set is derived from the Base pool. Base is to be passed in CIDR format. Example: a Base "10.10.0.0/16 with Size 24 will define the set of 256 10.10.[0-255].0/24 address pools
Source Files ¶
- Version
- v26.1.0+incompatible
- Published
- Apr 22, 2024
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 53 minutes ago –
Tools for package owners.