layer2

package
v0.14.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Announce

type Announce struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Announce is used to "announce" new IPs mapped to the node's MAC address.

func New

func New(l log.Logger, excludeRegexp *regexp.Regexp) (*Announce, error)

New returns an initialized Announce.

func (*Announce) AnnounceName

func (a *Announce) AnnounceName(name string) bool

AnnounceName returns true when we have an announcement under name.

func (*Announce) DeleteBalancer

func (a *Announce) DeleteBalancer(name string)

DeleteBalancer deletes an address from the set of addresses we should announce.

func (*Announce) GetInterfaces added in v0.13.6

func (a *Announce) GetInterfaces() []string

GetInterfaces returns current interfaces list.

func (*Announce) GetStatus added in v0.14.4

func (a *Announce) GetStatus(meta types.NamespacedName) []IPAdvertisement

GetStatus expose adv status.

func (*Announce) SetBalancer

func (a *Announce) SetBalancer(name string, adv IPAdvertisement)

SetBalancer adds ip to the set of announced addresses.

type IPAdvertisement added in v0.13.6

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

IPAdvertisement is the advertisement Info about LB IP.

func NewIPAdvertisement added in v0.13.6

func NewIPAdvertisement(ip net.IP, allInterfaces bool, interfaces sets.Set[string]) IPAdvertisement

func (*IPAdvertisement) Equal added in v0.13.6

func (i *IPAdvertisement) Equal(other *IPAdvertisement) bool

func (*IPAdvertisement) GetInterfaces added in v0.14.4

func (i *IPAdvertisement) GetInterfaces() sets.Set[string]

func (*IPAdvertisement) IsAllInterfaces added in v0.14.4

func (i *IPAdvertisement) IsAllInterfaces() bool

func (*IPAdvertisement) MatchInterfaces added in v0.13.6

func (i *IPAdvertisement) MatchInterfaces(intfs ...string) bool

Jump to

Keyboard shortcuts

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