allocator

package
v0.0.0-...-2275388 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotCIDRRange     error = errors.New("Address is contained in CIDR")
	ErrRangeFull        error = errors.New("Address range is full")
	ErrAlreadyAllocated error = errors.New("Already allocated")
	ErrNotAllocated     error = errors.New("Not allocated")
)

Functions

This section is empty.

Types

type Allocator

type Allocator interface {
	Allocate(netip.Addr) (netip.Addr, error)
	AllocateNext() (netip.Addr, error)
	Release(netip.Addr) (bool, error)
	IsAllocated(netip.Addr) bool
	IsEnabled() bool
	Enable()
	Disable()
	Allocated() string
}

func New

func New(cidr *netip.Prefix) Allocator

Jump to

Keyboard shortcuts

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