Documentation
¶
Index ¶
- type CommitArgs
- type CommitEntry
- type CommitReply
- type DoViewChangeArgs
- type DoViewChangeReply
- type Harness
- type HelloArgs
- type HelloReply
- type PrepareArgs
- type PrepareOKReply
- type RPCProxy
- func (rpp *RPCProxy) Commit(args CommitArgs, reply *CommitReply) error
- func (rpp *RPCProxy) DoViewChange(args DoViewChangeArgs, reply *DoViewChangeReply) error
- func (rpp *RPCProxy) Hello(args HelloArgs, reply *HelloReply) error
- func (rpp *RPCProxy) Prepare(args PrepareArgs, reply *PrepareOKReply) error
- func (rpp *RPCProxy) StartView(args StartViewArgs, reply *StartViewReply) error
- func (rpp *RPCProxy) StartViewChange(args StartViewChangeArgs, reply *StartViewChangeReply) error
- type Replica
- func (r *Replica) Commit(args CommitArgs, reply *CommitReply) error
- func (r *Replica) DoViewChange(args DoViewChangeArgs, reply *DoViewChangeReply) error
- func (r *Replica) Hello(args HelloArgs, reply *HelloReply) error
- func (r *Replica) Prepare(args PrepareArgs, reply *PrepareOKReply) error
- func (r *Replica) Report() (int, int, bool, ReplicaStatus)
- func (r *Replica) StartView(args StartViewArgs, reply *StartViewReply) error
- func (r *Replica) StartViewChange(args StartViewChangeArgs, reply *StartViewChangeReply) error
- func (r *Replica) Stop()
- func (r *Replica) Submit(req clientRequest) bool
- type ReplicaStatus
- 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()
- type StartViewArgs
- type StartViewChangeArgs
- type StartViewChangeReply
- type StartViewReply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommitArgs ¶
type CommitEntry ¶
type CommitReply ¶
type DoViewChangeArgs ¶
type DoViewChangeReply ¶
type Harness ¶
type Harness struct {
// contains filtered or unexported fields
}
func (*Harness) CheckNoPrimary ¶
func (h *Harness) CheckNoPrimary()
func (*Harness) CheckSinglePrimary ¶
CheckSinglePrimary returns primary's ID and viewNum.
func (*Harness) DisconnectPeer ¶
func (*Harness) ReconnectPeer ¶
type HelloReply ¶
type HelloReply struct {
ID int
}
type PrepareArgs ¶
type PrepareOKReply ¶
type PrepareOKReply struct { IsReplied bool ViewNum int OpNum int ReplicaID int Status ReplicaStatus }
type RPCProxy ¶
type RPCProxy struct {
// contains filtered or unexported fields
}
func (*RPCProxy) Commit ¶
func (rpp *RPCProxy) Commit(args CommitArgs, reply *CommitReply) error
func (*RPCProxy) DoViewChange ¶
func (rpp *RPCProxy) DoViewChange(args DoViewChangeArgs, reply *DoViewChangeReply) error
func (*RPCProxy) Prepare ¶
func (rpp *RPCProxy) Prepare(args PrepareArgs, reply *PrepareOKReply) error
func (*RPCProxy) StartView ¶
func (rpp *RPCProxy) StartView(args StartViewArgs, reply *StartViewReply) error
func (*RPCProxy) StartViewChange ¶
func (rpp *RPCProxy) StartViewChange(args StartViewChangeArgs, reply *StartViewChangeReply) error
type Replica ¶
type Replica struct { ID int // contains filtered or unexported fields }
func NewReplica ¶
func (*Replica) Commit ¶
func (r *Replica) Commit(args CommitArgs, reply *CommitReply) error
func (*Replica) DoViewChange ¶
func (r *Replica) DoViewChange(args DoViewChangeArgs, reply *DoViewChangeReply) error
func (*Replica) Prepare ¶
func (r *Replica) Prepare(args PrepareArgs, reply *PrepareOKReply) error
func (*Replica) StartView ¶
func (r *Replica) StartView(args StartViewArgs, reply *StartViewReply) error
func (*Replica) StartViewChange ¶
func (r *Replica) StartViewChange(args StartViewChangeArgs, reply *StartViewChangeReply) error
type ReplicaStatus ¶
type ReplicaStatus int
const ( Normal ReplicaStatus = iota Recovery ViewChange Transitioning Dead DoViewChange StartView )
func (ReplicaStatus) String ¶
func (rs ReplicaStatus) String() string
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(ready <-chan interface{}, commitChan chan<- CommitEntry) *Server
func (*Server) DisconnectAll ¶
func (s *Server) DisconnectAll()
func (*Server) DisconnectPeer ¶
func (*Server) GetListenAddr ¶
type StartViewArgs ¶
type StartViewChangeArgs ¶
type StartViewChangeReply ¶
type StartViewReply ¶
Click to show internal directories.
Click to hide internal directories.