Documentation
¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElectionConfig ¶
type LeaderElectionAdapter ¶
type LeaderElectionAdapter interface { Gossip(Msg) Accept() <-chan Msg CreateMessage(isDeclaration bool) Msg Peers() []Peer ReportMetrics(isLeader bool) }
func NewAdapter ¶
func NewAdapter(gossip gossip, pkiid common.PKIidType, channel common.ChannelID, metrics *metrics.ElectionMetrics) LeaderElectionAdapter
type LeaderElectionService ¶
type LeaderElectionService interface { IsLeader() bool Stop() Yield() }
func NewLeaderElectionService ¶
func NewLeaderElectionService(adapter LeaderElectionAdapter, id string, callback leadershipCallback, config ElectionConfig) LeaderElectionService
Click to show internal directories.
Click to hide internal directories.