leaser

package
v0.0.0-...-dd9aec0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CIDRPool

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

func NewCIDRPool

func NewCIDRPool(subnetRange string, subnetMask int) *CIDRPool

func (*CIDRPool) BlockPoolSize

func (c *CIDRPool) BlockPoolSize() int

func (*CIDRPool) GetAvailableBlock

func (c *CIDRPool) GetAvailableBlock(taken []string) string

func (*CIDRPool) GetAvailableSingleIP

func (c *CIDRPool) GetAvailableSingleIP(taken []string) string

func (*CIDRPool) GetBlockPool

func (c *CIDRPool) GetBlockPool() map[string]struct{}

func (*CIDRPool) GetSinglePool

func (c *CIDRPool) GetSinglePool() map[string]struct{}

func (*CIDRPool) IsMember

func (c *CIDRPool) IsMember(subnet string) bool

func (*CIDRPool) SingleIPPoolSize

func (c *CIDRPool) SingleIPPoolSize() int

type HardwareAddressGenerator

type HardwareAddressGenerator struct{}

func (*HardwareAddressGenerator) GenerateForVTEP

func (g *HardwareAddressGenerator) GenerateForVTEP(containerIP net.IP) (net.HardwareAddr, error)

type LeaseController

type LeaseController struct {
	DatabaseHandler            databaseHandler
	HardwareAddressGenerator   hardwareAddressGenerator
	AcquireSubnetLeaseAttempts int
	CIDRPool                   cidrPool
	LeaseValidator             leaseValidator
	LeaseExpirationSeconds     int
	Logger                     lager.Logger
}

func (*LeaseController) AcquireSubnetLease

func (c *LeaseController) AcquireSubnetLease(underlayIP string, singleOverlayIP bool) (*controller.Lease, error)

func (*LeaseController) ReleaseSubnetLease

func (c *LeaseController) ReleaseSubnetLease(underlayIP string) error

func (*LeaseController) RenewSubnetLease

func (c *LeaseController) RenewSubnetLease(lease controller.Lease) error

func (*LeaseController) RoutableLeases

func (c *LeaseController) RoutableLeases() ([]controller.Lease, error)

type LeaseValidator

type LeaseValidator struct{}

func (*LeaseValidator) Validate

func (v *LeaseValidator) Validate(lease controller.Lease) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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