Documentation ¶
Index ¶
- Constants
- type AppendEntriesArgs
- type AppendEntriesReply
- type Raft
- type RequestVoteArgs
- type RequestVoteReply
- type Server
- func (s *Server) Call(id int, serviceMethod string, args interface{}, reply interface{}) error
- func (s *Server) ConnectToPeer(peerId int, addr net.Addr) error
- func (s *Server) DisconnectAll()
- func (s *Server) DisconnectPeer(peerId int) error
- func (s *Server) GetListenAddr() net.Addr
- func (s *Server) Serve()
- func (s *Server) Shutdown()
Constants ¶
View Source
const DebugRaft = true
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppendEntriesArgs ¶
type AppendEntriesArgs struct { }
type AppendEntriesReply ¶
type AppendEntriesReply struct { }
type Raft ¶
type Raft struct {
// contains filtered or unexported fields
}
func (*Raft) AppendEntries ¶
func (rf *Raft) AppendEntries(args AppendEntriesArgs, reply *AppendEntriesReply) error
func (*Raft) RequestVote ¶
func (rf *Raft) RequestVote(args RequestVoteArgs, reply *RequestVoteReply) error
type RequestVoteArgs ¶
type RequestVoteArgs struct { }
type RequestVoteReply ¶
type RequestVoteReply struct { }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) DisconnectAll ¶
func (s *Server) DisconnectAll()
func (*Server) DisconnectPeer ¶
func (*Server) GetListenAddr ¶
Click to show internal directories.
Click to hide internal directories.