Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupportedEndpointType = errors.New("given endpoint type not supported")
ErrUnsupportedEndpointType is returned for an unsupported endpoint
Functions ¶
This section is empty.
Types ¶
type ConsulLeaderChecker ¶
type ConsulLeaderChecker struct {
// contains filtered or unexported fields
}
ConsulLeaderChecker is used to check state of the leader key in Consul
func NewConsulLeaderChecker ¶
func NewConsulLeaderChecker(con *vipconfig.Config) (*ConsulLeaderChecker, error)
NewConsulLeaderChecker returns a new instance
func (*ConsulLeaderChecker) GetChangeNotificationStream ¶
func (c *ConsulLeaderChecker) GetChangeNotificationStream(ctx context.Context, out chan<- bool) error
GetChangeNotificationStream checks the status in the loop
type EtcdLeaderChecker ¶
type EtcdLeaderChecker struct {
// contains filtered or unexported fields
}
EtcdLeaderChecker is used to check state of the leader key in Etcd
func NewEtcdLeaderChecker ¶
func NewEtcdLeaderChecker(con *vipconfig.Config) (*EtcdLeaderChecker, error)
NewEtcdLeaderChecker returns a new instance
func (*EtcdLeaderChecker) GetChangeNotificationStream ¶
func (e *EtcdLeaderChecker) GetChangeNotificationStream(ctx context.Context, out chan<- bool) error
GetChangeNotificationStream checks the status in the loop
type LeaderChecker ¶
type LeaderChecker interface {
GetChangeNotificationStream(ctx context.Context, out chan<- bool) error
}
LeaderChecker is the interface for checking leadership
func NewLeaderChecker ¶
func NewLeaderChecker(con *vipconfig.Config) (LeaderChecker, error)
NewLeaderChecker returns a new LeaderChecker instance depending on the configuration
Click to show internal directories.
Click to hide internal directories.