linkmanager

package
v0.0.0-...-12c5f08 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeprecatedGetAssignedAddressLabel

func DeprecatedGetAssignedAddressLabel(linkName string) string

DeprecatedGetAssignedAddressLabel returns the label that must be assigned to each egress IP address bound to an interface

Types

type Controller

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

func NewController

func NewController(name string, v4, v6 bool, linkHandlerFunc func(link netlink.Link) error) *Controller

NewController creates a controller to manage linux network interfaces

func (*Controller) AddAddress

func (c *Controller) AddAddress(address netlink.Addr) error

AddAddress stores the address in a store and ensures its applied

func (*Controller) DelAddress

func (c *Controller) DelAddress(address netlink.Addr) error

DelAddress removes the address from the store and ensure its removed from a link

func (*Controller) Run

func (c *Controller) Run(stopCh <-chan struct{}, doneWg *sync.WaitGroup)

Run starts the controller and syncs at least every syncPeriod linkHandlerFunc fires as an additional handler when sync runs

type LinkAddress

type LinkAddress struct {
	Link      netlink.Link
	Addresses []netlink.Addr
}

Jump to

Keyboard shortcuts

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