Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppendEntriesRequest ¶
type AppendEntriesResponse ¶
type Raft ¶
func (*Raft) AppendEntries ¶
func (r *Raft) AppendEntries(appendEntries AppendEntriesRequest, appendResponse *AppendEntriesResponse)
func (*Raft) HasVotedFor ¶
func (*Raft) VoteRequest ¶
func (r *Raft) VoteRequest(requestVote RequestVoteRequest, voteResponse *RequestVoteResponse)
type RequestVoteRequest ¶
type RequestVoteRequest struct { // CandidateID is candidate requesting vote. CandidateID []byte `json:"candidate_id"` // LastLogIndex is index of candidate’s last log entry. LastLogIndex int `json:"last_log_index"` // LastLogTerm is term of candidate’s last log entry. LastLogTerm state.Term `json:"last_log_term"` // Term is candidate’s term. Term state.Term `json:"term"` }
type RequestVoteResponse ¶
Click to show internal directories.
Click to hide internal directories.