ippool

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPPool

type IPPool struct {
	IPSubnet *net.IPNet
	Pool     *LazyReusePool
}

func NewIPPool

func NewIPPool(cidr string) (*IPPool, error)

func (*IPPool) Allocate

func (p *IPPool) Allocate(request net.IP) (net.IP, error)

func (*IPPool) Exclude

func (p *IPPool) Exclude(excludePool *IPPool) error

func (*IPPool) Reallocate

func (p *IPPool) Reallocate(request net.IP) (net.IP, bool)

func (*IPPool) Release

func (p *IPPool) Release(ip net.IP) error

func (*IPPool) String

func (p *IPPool) String() string

type LazyReusePool

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

func NewLazyReusePool

func NewLazyReusePool(first, last int) (*LazyReusePool, error)

NewLazyReusePool makes a LazyReusePool.

func (*LazyReusePool) Allocate

func (p *LazyReusePool) Allocate() (res int, ok bool)

func (*LazyReusePool) Contains

func (p *LazyReusePool) Contains(first, last int) bool

func (*LazyReusePool) Dump

func (p *LazyReusePool) Dump() [][]int

func (*LazyReusePool) Free

func (p *LazyReusePool) Free(value int) bool

func (*LazyReusePool) IsJoint

func (p1 *LazyReusePool) IsJoint(p2 *LazyReusePool) bool

func (*LazyReusePool) Max

func (p *LazyReusePool) Max() int

func (*LazyReusePool) Min

func (p *LazyReusePool) Min() int

func (*LazyReusePool) Remain

func (p *LazyReusePool) Remain() int

func (*LazyReusePool) Reserve

func (p *LazyReusePool) Reserve(first, last int) error

func (*LazyReusePool) Total

func (p *LazyReusePool) Total() int

func (*LazyReusePool) Use

func (p *LazyReusePool) Use(value int) bool

Jump to

Keyboard shortcuts

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