garp

package
v1.14.19 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// L2PodAnnouncementsInterface is the interface used to send Gratuitous ARP messages.
	L2PodAnnouncementsInterface = "l2-pod-announcements-interface"

	EnableL2PodAnnouncements = "enable-l2-pod-announcements"
)

Variables

View Source
var Cell = cell.Module(
	"l2-pod-announcements-garp",
	"GARP processor sends gratuitous ARP packets for local pods",

	cell.Provide(
		newGARPSender,
		func(c Config) L2PodAnnouncementConfig {
			return c
		}),

	cell.Config(Config{}),

	cell.Invoke(newGARPProcessor),
)

Cell processes k8s pod events for the local node and determines if a Gratuitous ARP packet needs to be sent.

Functions

func SendOnInterfaceIdx

func SendOnInterfaceIdx(ifaceIdx int, ip netip.Addr) error

Types

type Config

type Config struct {
	L2PodAnnouncementsInterface string
	EnableL2PodAnnouncements    bool
}

Config contains the configuration for the GARP cell.

func (Config) Enabled added in v1.14.19

func (def Config) Enabled() bool

func (Config) Flags

func (def Config) Flags(flags *pflag.FlagSet)

type L2PodAnnouncementConfig added in v1.14.19

type L2PodAnnouncementConfig interface {
	Enabled() bool
}

type Sender

type Sender interface {
	Send(netip.Addr) error
}

Jump to

Keyboard shortcuts

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