ipamutils

package
v25.0.17+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 3 Imported by: 90 modules, 384 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ipamutils provides utility functions for ipam management

Index

Constants

This section is empty.

Variables

This section is empty.

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

func GetGlobalScopeDefaultNetworks() []*net.IPNet

GetGlobalScopeDefaultNetworks returns a copy of the global-sopce network list.

func GetLocalScopeDefaultNetworks

func GetLocalScopeDefaultNetworks() []*net.IPNet

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

type NetworkToSplit struct {
	Base string `json:"base"`
	Size int    `json:"size"`
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL