Versions in this module Expand all Collapse all v0 v0.1.0 Apr 6, 2021 Changes in this version + type AppendEntriesRequest struct + CurrentTerm uint64 + LeaderID string + type AppendEntriesResponse struct + Success bool + Term uint64 + type RPCServer struct + func (s *RPCServer) AppendEntries(appendRequest AppendEntriesRequest, response *AppendEntriesResponse) error + func (s *RPCServer) RequestVote(voteRequest RequestVoteRequest, response *RequestVoteResponse) error + type Raft struct + func NewRaft(listenAddress string, listenPort int, clusterNodes []string) *Raft + func (r *Raft) GetLeader() string + func (r *Raft) Shutdown() + type RequestVoteRequest struct + Candidate string + Response chan RequestVoteResponse + Term uint64 + type RequestVoteResponse struct + Granted bool + type State uint32 + const CANDIDATE + const FOLLOWER + const LEADER + const SHUTDOWN