Documentation ¶
Index ¶
- type Consensus
- func (c *Consensus) HeartBeat(args *model.HeartBeatRequest, reply *model.HeartBeatResponse) error
- func (c *Consensus) Ping(args struct{}, reply *string) error
- func (c *Consensus) RequestVote(args *model.RequestVoteRequest, reply *model.RequestVoteResponse) error
- func (c *Consensus) Run() (<-chan model.StateTransition, error)
- func (c *Consensus) Visualize() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consensus ¶
type Consensus struct {
// contains filtered or unexported fields
}
func NewConsensus ¶
func (*Consensus) HeartBeat ¶
func (c *Consensus) HeartBeat(args *model.HeartBeatRequest, reply *model.HeartBeatResponse) error
HeartBeat handles heartbeat request from peer node
func (*Consensus) RequestVote ¶
func (c *Consensus) RequestVote(args *model.RequestVoteRequest, reply *model.RequestVoteResponse) error
RequestVote handle vote request from peer node
Click to show internal directories.
Click to hide internal directories.