kubernetes/pkg/controller/nodeipam/ipam/cidrset/cidr_set.go

type CidrSet

const clusterSubnetMaxDiff

const halfIPv6Len

var ErrCIDRRangeNoCIDRsRemaining

var ErrCIDRSetSubNetTooBig

// NewCIDRSet creates a new CidrSet.
func NewCIDRSet(clusterCIDR *net.IPNet, subNetMaskSize int) (*CidrSet, error) {}

func (s *CidrSet) indexToCIDRBlock(index int) *net.IPNet {}

// AllocateNext allocates the next free CIDR range. This will set the range
// as occupied and return the allocated range.
func (s *CidrSet) AllocateNext() (*net.IPNet, error) {}

func (s *CidrSet) getBeginningAndEndIndices(cidr *net.IPNet) (begin, end int, err error) {}

// Release releases the given CIDR range.
func (s *CidrSet) Release(cidr *net.IPNet) error {}

// Occupy marks the given CIDR range as used. Occupy succeeds even if the CIDR
// range was previously used.
func (s *CidrSet) Occupy(cidr *net.IPNet) (err error) {}

func (s *CidrSet) getIndexForIP(ip net.IP) (int, error) {}

// getMaxCIDRs returns the max number of CIDRs that can be obtained by subdividing a mask of size `clusterMaskSize`
// into subnets with mask of size `subNetMaskSize`.
func getMaxCIDRs(subNetMaskSize, clusterMaskSize int) int {}