cidralloc

package
v1.15.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CIDRAllocator

type CIDRAllocator interface {
	fmt.Stringer

	Occupy(cidr *net.IPNet) error
	AllocateNext() (*net.IPNet, error)
	Release(cidr *net.IPNet) error
	IsAllocated(cidr *net.IPNet) (bool, error)
	IsFull() bool
	InRange(cidr *net.IPNet) bool
	IsClusterCIDR(prefix netip.Prefix) bool
	Prefix() netip.Prefix
}

func NewCIDRSets

func NewCIDRSets(isV6 bool, strCIDRs []string, maskSize int) ([]CIDRAllocator, error)

type ErrCIDRCollision

type ErrCIDRCollision struct {
	// contains filtered or unexported fields
}

func (ErrCIDRCollision) Error

func (e ErrCIDRCollision) Error() string

func (*ErrCIDRCollision) Is

func (e *ErrCIDRCollision) Is(target error) bool

Jump to

Keyboard shortcuts

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