util

package
v0.0.0-alpha.0....-b392d64 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSubnetAllocatorFull = fmt.Errorf("no subnets available.")

Functions

This section is empty.

Types

type SubnetAllocator

type SubnetAllocator struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewSubnetAllocator

func NewSubnetAllocator() *SubnetAllocator

func (*SubnetAllocator) AddNetworkRange

func (sna *SubnetAllocator) AddNetworkRange(network string, hostBits uint32) error

func (*SubnetAllocator) AllocateNetwork

func (sna *SubnetAllocator) AllocateNetwork() (string, error)

func (*SubnetAllocator) MarkAllocatedNetwork

func (sna *SubnetAllocator) MarkAllocatedNetwork(subnet string) error

func (*SubnetAllocator) ReleaseNetwork

func (sna *SubnetAllocator) ReleaseNetwork(subnet string) error

Jump to

Keyboard shortcuts

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