Version: v1.12.0 Latest Latest

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 14 Imported by: 0




This section is empty.


This section is empty.


func NewLocalIPDetector

func NewLocalIPDetector() *localIPDetector


type IPAssigner

type IPAssigner interface {
	// AssignIP ensures the provided IP is assigned to the system.
	AssignIP(ip string) error
	// UnassignIP ensures the provided IP is not assigned to the system.
	UnassignIP(ip string) error
	// AssignedIPs return the IPs that are assigned to the system by this IPAssigner.
	AssignedIPs() sets.Set[string]
	// InitIPs ensures the IPs that are assigned to the system match the given IPs.
	InitIPs(sets.Set[string]) error
	// Run starts the IP assigner.
	Run(<-chan struct{})

IPAssigner provides methods to assign or unassign IP.

func NewIPAssigner

func NewIPAssigner(nodeTransportInterface string, dummyDeviceName string) (IPAssigner, error)

NewIPAssigner returns an *ipAssigner.

type LocalIPDetector

type LocalIPDetector interface {
	IsLocalIP(ip string) bool

	// Run starts the detector.
	Run(stopCh <-chan struct{})

	// AddEventHandler registers an eventHandler of IP address update. It's not thread-safe and should be called before
	// starting the detector.
	AddEventHandler(handler LocalIPEventHandler)

	// HasSynced returns true if the cache has been initialized with the full lists of IP addresses.
	HasSynced() bool

type LocalIPEventHandler

type LocalIPEventHandler func(ip string, added bool)


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

Jump to

Keyboard shortcuts

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