ipam

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPAM

type IPAM interface {
	Allocate() (net.IP, error)
	Release(ip net.IP) error
	IsUsed(ip net.IP) bool
	Contains(ip net.IP) bool
}

func New

func New(config *koanf.Koanf, nlHandle *netlink.Handle, link netlink.Link) (IPAM, error)

type Range

type Range struct {
	From net.IP
	To   net.IP
}

func (Range) Contains

func (r Range) Contains(ip net.IP) bool

type SimpleIpam

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

func (*SimpleIpam) Allocate

func (s *SimpleIpam) Allocate() (net.IP, error)

func (*SimpleIpam) Contains

func (s *SimpleIpam) Contains(ip net.IP) bool

func (*SimpleIpam) IsUsed

func (s *SimpleIpam) IsUsed(ip net.IP) bool

func (*SimpleIpam) Release

func (s *SimpleIpam) Release(ip net.IP) error

Jump to

Keyboard shortcuts

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