vip

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 13 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
}

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) (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