manager

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 6 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(req ipamspec.IPAMRequest) bool

Allocates this particular ip from the IPAM LABEL

func (*IPAMManager) CreateARecord

func (ipMgr *IPAMManager) CreateARecord(req ipamspec.IPAMRequest) bool

Creates an A record

func (*IPAMManager) DeleteARecord

func (ipMgr *IPAMManager) DeleteARecord(req ipamspec.IPAMRequest)

Deletes an A record and releases the IP address

func (*IPAMManager) GetIPAddress

func (ipMgr *IPAMManager) GetIPAddress(req ipamspec.IPAMRequest) string

func (*IPAMManager) GetNextIPAddress

func (ipMgr *IPAMManager) GetNextIPAddress(req ipamspec.IPAMRequest) string

Gets and reserves the next available IP address

func (*IPAMManager) ReleaseIPAddress

func (ipMgr *IPAMManager) ReleaseIPAddress(req ipamspec.IPAMRequest)

Releases an IP address

type IPAMManagerParams

type IPAMManagerParams struct {
	Range string
}

type Manager

type Manager interface {
	// Creates an A record
	CreateARecord(req ipamspec.IPAMRequest) bool
	// Deletes an A record and releases the IP address
	DeleteARecord(req ipamspec.IPAMRequest)
	// Gets IP Address associated with hostname
	GetIPAddress(req ipamspec.IPAMRequest) string
	// Gets and reserves the next available IP address
	GetNextIPAddress(req ipamspec.IPAMRequest) string
	// Allocates given IP address
	AllocateIPAddress(req ipamspec.IPAMRequest) bool
	// Releases an IP address
	ReleaseIPAddress(req ipamspec.IPAMRequest)
}

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