Documentation ¶
Index ¶
Constants ¶
View Source
const ( FOLLOWER = 0 CANDIDATE = 1 LEADER = 2 )
View Source
const Debug = 0
Debugging
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppendEntriesArgs ¶
type AppendEntriesReply ¶
type Persister ¶
type Persister struct {
// contains filtered or unexported fields
}
func MakePersister ¶
func MakePersister() *Persister
func (*Persister) RaftStateSize ¶
func (*Persister) ReadRaftState ¶
func (*Persister) ReadSnapshot ¶
func (*Persister) SaveRaftState ¶
func (*Persister) SaveSnapshot ¶
type Raft ¶
type Raft struct {
// contains filtered or unexported fields
}
func (*Raft) AppendEntries ¶
func (rf *Raft) AppendEntries(args AppendEntriesArgs, reply *AppendEntriesReply)
func (*Raft) RequestVote ¶
func (rf *Raft) RequestVote(args RequestVoteArgs, reply *RequestVoteReply)
type RequestVoteArgs ¶
type RequestVoteReply ¶
Click to show internal directories.
Click to hide internal directories.