Documentation ¶
Index ¶
Constants ¶
View Source
const ( ROLE_FOLLOWER = iota ROLE_CANDIDATER ROLE_LEADER )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Raft ¶
type Raft struct {
// contains filtered or unexported fields
}
func (*Raft) AppendEntries ¶
func (rf *Raft) AppendEntries(args *message.AppendEntriesArgs, reply *message.AppendEntriesReply)
AppendEntries follower 追加日志
func (*Raft) ReplyVote ¶
func (rf *Raft) ReplyVote(args *message.RequestVoteArgs, reply *message.RequestVoteReply)
ReplyVote follower 响应 candidate 的投票请求
Click to show internal directories.
Click to hide internal directories.