vip

package
v1.3.3-beta.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewVIPManager

func NewVIPManager(lg *zap.Logger, cfgGetter config.ConfigGetter) (*vipManager, error)

Types

type NetworkOperation

type NetworkOperation interface {
	HasIP() (bool, error)
	AddIP() error
	DeleteIP() error
	SendARP() error
	Addr() string
}

NetworkOperation is the interface for adding, deleting, and broadcasting VIP. Extract the operations into an interface to make testing easier.

func NewNetworkOperation

func NewNetworkOperation(addressStr, linkStr string, lg *zap.Logger) (NetworkOperation, error)

type VIPManager

type VIPManager interface {
	Start(context.Context, *clientv3.Client) error
	PreClose()
	Close()
}

Jump to

Keyboard shortcuts

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