Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StateName = map[CandidateState]string{ StateLeader: "LEADER", StateNotLeader: "NOT_LEADER", }
Functions ¶
Types ¶
type Candidate ¶
type Candidate struct { C <-chan CandidateState // contains filtered or unexported fields }
func NewCandidate ¶
func (*Candidate) State ¶
func (c *Candidate) State() CandidateState
type CandidateState ¶
type CandidateState int
const ( StateUndefined CandidateState = iota StateLeader StateNotLeader )
Click to show internal directories.
Click to hide internal directories.