Documentation ¶
Overview ¶
This package is in charge of sending rpc request and handling the received request.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppEntryArgs ¶
type AppEntryChan ¶
type AppEntryChan struct { Args chan *AppEntryArgs Result chan *AppEntryResult }
func NewAppEntryChan ¶
func NewAppEntryChan() AppEntryChan
type AppEntryResult ¶
type DataChan ¶
type DataChan struct { Vc VoteChan Ac AppEntryChan }
func NewDataChan ¶
func NewDataChan() DataChan
type DataService ¶
type DataService interface {
GetDataChan() <-chan DataChan
}
type Entry ¶
func (*Entry) UnSerialise ¶
type Sender ¶
type Sender struct {
Addr []string
}
func (*Sender) AppEntries ¶
func (s *Sender) AppEntries(addr string, args AppEntryArgs, result *AppEntryResult) error
func (*Sender) RequestVote ¶
func (s *Sender) RequestVote(addr string, args VoteArgs, result *VoteResult) error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) AppendEntries ¶
func (r *Service) AppendEntries(args *AppEntryArgs, result *AppEntryResult) error
func (Service) GetDataChan ¶
func (*Service) RequestVote ¶
func (r *Service) RequestVote(args *VoteArgs, result *VoteResult) error
type VoteChan ¶
type VoteChan struct { Args chan *VoteArgs Result chan *VoteResult }
func NewVoteChan ¶
func NewVoteChan() VoteChan
type VoteResult ¶
Click to show internal directories.
Click to hide internal directories.