Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElectionParticipant ¶
type ElectionParticipant interface {
IsLeader() bool
}
ElectionParticipant partakes in leader election to become leader.
func NewElectionParticipant ¶
func NewElectionParticipant(lock dl.Lock, resourceName string, options ElectionParticipantOptions) ElectionParticipant
NewElectionParticipant returns a ElectionParticipant which attempts to become leader.
type ElectionParticipantOptions ¶
type ElectionParticipantOptions struct { LeaderLeaseRefreshInterval time.Duration FollowerLeaseRefreshInterval time.Duration Logger *zap.Logger }
ElectionParticipantOptions control behavior of the election participant. TODO func applyDefaults(), parameter error checking, etc.
Click to show internal directories.
Click to hide internal directories.