Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewIPAssigner ¶
NewIPAssigner returns an *ipAssigner.
func NewLocalIPDetector ¶
func NewLocalIPDetector() *localIPDetector
Types ¶
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.String }
IPAssigner provides methods to assign or unassign IP.
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 ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.