Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- handleAppendEntries :: RPCHandler Candidate sm (AppendEntries v) v
- handleAppendEntriesResponse :: RPCHandler Candidate sm AppendEntriesResponse v
- handleRequestVote :: RPCHandler Candidate sm RequestVote v
- handleRequestVoteResponse :: forall sm v. Show v => RPCHandler Candidate sm RequestVoteResponse v
- handleTimeout :: TimeoutHandler Candidate sm v
- handleClientRequest :: ClientReqHandler Candidate sm v
Documentation
handleAppendEntries :: RPCHandler Candidate sm (AppendEntries v) v Source #
handleAppendEntriesResponse :: RPCHandler Candidate sm AppendEntriesResponse v Source #
Candidates should not respond to AppendEntriesResponse
messages.
handleRequestVoteResponse :: forall sm v. Show v => RPCHandler Candidate sm RequestVoteResponse v Source #
Candidates should not respond to RequestVoteResponse
messages.
handleTimeout :: TimeoutHandler Candidate sm v Source #
handleClientRequest :: ClientReqHandler Candidate sm v Source #
When candidates handle a client request, they respond with NoLeader, as the very reason they are candidate is because there is no leader. This is done instead of simply not responding such that the client can know that the node is live but that there is an election taking place.