ipam

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(list []string, strToSearch string) bool

Contains returns true if a list contains a string.

func Filter

func Filter(list []string, strToFilter string) (newList []string)

Filter filters a list for a string.

Types

type HasRequeueAfterError

type HasRequeueAfterError interface {
	// GetRequeueAfter gets the duration to wait until the managed object is
	// requeued for further processing.
	GetRequeueAfter() time.Duration
}

HasRequeueAfterError represents that an actuator managed object should be requeued for further processing after the given RequeueAfter time has passed.

type IPPoolManager

type IPPoolManager struct {
	IPPool *ipamv1.IPPool
	Log    logr.Logger
	// contains filtered or unexported fields
}

IPPoolManager is responsible for performing machine reconciliation.

func NewIPPoolManager

func NewIPPoolManager(client client.Client, ipPool *ipamv1.IPPool, ipPoolLog logr.Logger) (*IPPoolManager, error)

NewIPPoolManager returns a new helper for managing a ipPool object.

func (*IPPoolManager) SetClusterOwnerRef

func (m *IPPoolManager) SetClusterOwnerRef(cluster *clusterv1.Cluster) error

func (*IPPoolManager) SetFinalizer

func (m *IPPoolManager) SetFinalizer()

SetFinalizer sets finalizer.

func (*IPPoolManager) UnsetFinalizer

func (m *IPPoolManager) UnsetFinalizer()

UnsetFinalizer unsets finalizer.

func (*IPPoolManager) UpdateAddresses

func (m *IPPoolManager) UpdateAddresses(ctx context.Context) (int, error)

UpdateAddresses manages the claims and creates or deletes IPAddress accordingly. It returns the number of current allocations.

type IPPoolManagerInterface

type IPPoolManagerInterface interface {
	SetFinalizer()
	UnsetFinalizer()
	SetClusterOwnerRef(*clusterv1.Cluster) error
	UpdateAddresses(context.Context) (int, error)
}

IPPoolManagerInterface is an interface for a IPPoolManager.

type ManagerFactory

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

ManagerFactory only contains a client.

func NewManagerFactory

func NewManagerFactory(client client.Client) ManagerFactory

NewManagerFactory returns a new factory.

func (ManagerFactory) NewIPPoolManager

func (f ManagerFactory) NewIPPoolManager(ipPool *ipamv1.IPPool, metadataLog logr.Logger) (IPPoolManagerInterface, error)

NewIPPoolManager creates a new IPPoolManager.

type ManagerFactoryInterface

type ManagerFactoryInterface interface {
	NewIPPoolManager(*ipamv1.IPPool, logr.Logger) (
		IPPoolManagerInterface, error,
	)
}

type NotFoundError

type NotFoundError struct {
}

NotFoundError represents that an object was not found.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type RequeueAfterError

type RequeueAfterError struct {
	RequeueAfter time.Duration
}

RequeueAfterError represents that an actuator managed object should be requeued for further processing after the given RequeueAfter time has passed.

func (*RequeueAfterError) Error

func (e *RequeueAfterError) Error() string

Error implements the error interface.

func (*RequeueAfterError) GetRequeueAfter

func (e *RequeueAfterError) GetRequeueAfter() time.Duration

GetRequeueAfter gets the duration to wait until the managed object is requeued for further processing.

Directories

Path Synopsis
Package ipam_mocks is a generated GoMock package.
Package ipam_mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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