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 ConnRejecter ¶ added in v1.3.3
ConnRejecter reports whether the instance is currently rejecting new connections.
type NetworkOperation ¶
type NetworkOperation interface {
HasIP() (bool, error)
AddIP(context.Context) error
DeleteIP(context.Context) error
SendARP(context.Context) 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 ¶
type VIPManager ¶
type VIPManager interface {
Start(context.Context, *clientv3.Client) error
// SetConnRejecter configures the checker that decides whether the instance is
// rejecting new connections. When it reports a rejection, the manager resigns
// the VIP owner so a healthy node takes over, and re-campaigns once it stops
// rejecting.
SetConnRejecter(ConnRejecter)
PreClose()
Close()
}
Click to show internal directories.
Click to hide internal directories.