manager

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 F5IPAMProvider = "f5-ip-provider"

Variables

This section is empty.

Functions

This section is empty.

Types

type IPAMManager

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

func NewIPAMManager

func NewIPAMManager(params IPAMManagerParams) (*IPAMManager, error)

func (*IPAMManager) AllocateIPAddress

func (ipMgr *IPAMManager) AllocateIPAddress(cidr, ipAddr string) bool

Allocates this particular ip from the CIDR

func (*IPAMManager) CreateARecord

func (ipMgr *IPAMManager) CreateARecord(hostname, ipAddr string) bool

Creates an A record

func (*IPAMManager) DeleteARecord

func (ipMgr *IPAMManager) DeleteARecord(hostname, ipAddr string)

Deletes an A record and releases the IP address

func (*IPAMManager) GetIPAddress

func (ipMgr *IPAMManager) GetIPAddress(hostname string) string

func (*IPAMManager) GetNextIPAddress

func (ipMgr *IPAMManager) GetNextIPAddress(cidr string) string

Gets and reserves the next available IP address

func (*IPAMManager) ReleaseIPAddress

func (ipMgr *IPAMManager) ReleaseIPAddress(ipAddr string)

Releases an IP address

type IPAMManagerParams

type IPAMManagerParams struct {
	Range string
}

type Manager

type Manager interface {
	// Creates an A record
	CreateARecord(hostname, ipAddr string) bool
	// Deletes an A record and releases the IP address
	DeleteARecord(hostname, ipAddr string)
	// Gets IP Address associated with hostname
	GetIPAddress(hostname string) string
	// Gets and reserves the next available IP address
	GetNextIPAddress(cidr string) string
	// Allocates this particular ip from the CIDR
	AllocateIPAddress(cidr, ipAddr string) bool
	// Releases an IP address
	ReleaseIPAddress(ipAddr string)
}

Manager defines the interface that the IPAM system should implement

func NewManager

func NewManager(params Params) (Manager, error)

type Params

type Params struct {
	Provider string
	IPAMManagerParams
}

Jump to

Keyboard shortcuts

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