address

package
v0.0.0-...-65a38e8 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//DefaultRequestedAddressSleepTime is the time to wait between attempts while searching for an address
	DefaultRequestedAddressSleepTime = 100 * time.Millisecond

	//DefaultRouteProtocol is the route protocol to use when inserting routes into the main routing table
	DefaultRouteProtocol = 192

	//DefaultPropagationTimeout is the minimum estimated time it takes routes to propagate across your cluster
	DefaultPropagationTimeout = 250 * time.Millisecond
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	IPNet *net.IPNet
	// contains filtered or unexported fields
}

Address represents an address allocated by the IPAM

func Get

func Get(cidr string, linkIndex int) (*Address, error)

Get returns a populated Address struct

func New

func New(cidr string, linkIndex, excludeFirst, excludeLast int) (*Address, error)

New allocates a new address from the network and claims it by installing it into the routing table

func (*Address) Delete

func (a *Address) Delete() error

Delete deletes the address from the routing table

func (*Address) IP

func (a *Address) IP() net.IP

IP Returns the IP of the Address

Jump to

Keyboard shortcuts

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