pool

package
v0.0.0-...-1454e04 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RandomAddressPool

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

RandomAddressPool that returns a random IP address from a pool of available addresses

func NewRandomAddressPool

func NewRandomAddressPool(poolStartAddress net.IP, poolSize uint64, validLifetime uint32) *RandomAddressPool

NewRandomAddressPool creates a new RandomAddressPool using pool start IP address, pool size, and valid lifetime of interface associations

func (*RandomAddressPool) ReleaseAddresses

func (p *RandomAddressPool) ReleaseAddresses(clientID []byte, interfaceIDs [][]byte)

ReleaseAddresses returns IP addresses associated with ClientID and interfaceIDs back into the address pool

func (*RandomAddressPool) ReserveAddresses

func (p *RandomAddressPool) ReserveAddresses(clientID []byte, interfaceIDs [][]byte) ([]*types.IdentityAssociation, error)

ReserveAddresses creates new or retrieves active associations for interfaces in interfaceIDs list.

Jump to

Keyboard shortcuts

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