Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailabilityCriteria ¶
type AvailabilityCriteria func() bool
type Candidate ¶
type Candidate interface { Init(context.Context) Deinit(context.Context) AddAvailabilityCriteria(AvailabilityCriteria) TryBecomeLeader(context.Context) bool RenewLeadershipLease(context.Context) IsAvailable() bool IsCurrentLeader(context.Context) bool UpdateCandidateStatus(context.Context, bool) TrimCandidates(context.Context) GetLeaderCandidates(context.Context) []string SetState(context.Context, State) SetLeaderAndCandidateFields(context.Context) DoWork(context.Context) LosingLeadership() signalslots.Signal BecameLeader() signalslots.Signal BecameFollower() signalslots.Signal CandidateUpdate() <-chan time.Time LeaderAttempt() <-chan time.Time LeaseRenewal() <-chan time.Time }
Click to show internal directories.
Click to hide internal directories.