type Config … func (c Config) String() string { … } // Clone returns a copy of the Config that shares no memory with the original. func (c *Config) Clone() Config { … } type ProgressTracker … // MakeProgressTracker initializes a ProgressTracker. func MakeProgressTracker(maxInflight int) ProgressTracker { … } // ConfState returns a ConfState representing the active configuration. func (p *ProgressTracker) ConfState() pb.ConfState { … } // IsSingleton returns true if (and only if) there is only one voting member // (i.e. the leader) in the current configuration. func (p *ProgressTracker) IsSingleton() bool { … } type matchAckIndexer … var _ … // AckedIndex implements IndexLookuper. func (l matchAckIndexer) AckedIndex(id uint64) (quorum.Index, bool) { … } // Committed returns the largest log index known to be committed based on what // the voting members of the group have acknowledged. func (p *ProgressTracker) Committed() uint64 { … } func insertionSort(sl []uint64) { … } // Visit invokes the supplied closure for all tracked progresses in stable order. func (p *ProgressTracker) Visit(f func(id uint64, pr *Progress)) { … } // QuorumActive returns true if the quorum is active from the view of the local // raft state machine. Otherwise, it returns false. func (p *ProgressTracker) QuorumActive() bool { … } // VoterNodes returns a sorted slice of voters. func (p *ProgressTracker) VoterNodes() []uint64 { … } // LearnerNodes returns a sorted slice of learners. func (p *ProgressTracker) LearnerNodes() []uint64 { … } // ResetVotes prepares for a new round of vote counting via recordVote. func (p *ProgressTracker) ResetVotes() { … } // RecordVote records that the node with the given id voted for this Raft // instance if v == true (and declined it otherwise). func (p *ProgressTracker) RecordVote(id uint64, v bool) { … } // TallyVotes returns the number of granted and rejected Votes, and whether the // election outcome is known. func (p *ProgressTracker) TallyVotes() (granted int, rejected int, _ quorum.VoteResult) { … }