provider

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IPV4 = "IPv4"
	IPV6 = "IPv6"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IPAMProvider

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

func NewProvider

func NewProvider(params Params) *IPAMProvider

func (*IPAMProvider) AllocateIPAddress

func (prov *IPAMProvider) AllocateIPAddress(cidr, ipAddr string) bool

Marks an IP address as allocated if it belongs to that CIDR

func (*IPAMProvider) CreateARecord

func (prov *IPAMProvider) CreateARecord(hostname, ipAddr string) bool

Creates an A record

func (*IPAMProvider) DeleteARecord

func (prov *IPAMProvider) DeleteARecord(hostname, ipAddr string)

Deletes an A record and releases the IP address

func (*IPAMProvider) GetIPAddress

func (prov *IPAMProvider) GetIPAddress(hostname string) string

func (*IPAMProvider) GetNextAddr

func (prov *IPAMProvider) GetNextAddr(cidr string) string

Gets and reserves the next available IP address

func (*IPAMProvider) ReleaseAddr

func (prov *IPAMProvider) ReleaseAddr(ipAddr string)

Releases an IP address

type Params

type Params struct {
	Range string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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