checker

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: BSD-2-Clause Imports: 14 Imported by: 0

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

Jump to

Keyboard shortcuts

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