Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- handleEvent :: forall sm v. (RSMP sm v, Show v) => RaftNodeState -> TransitionEnv sm -> PersistentState -> Event v -> (RaftNodeState, PersistentState, [Action sm v], [LogMsg])
- data RaftHandler ns sm v = RaftHandler {
- handleAppendEntries :: RPCHandler ns sm (AppendEntries v) v
- handleAppendEntriesResponse :: RPCHandler ns sm AppendEntriesResponse v
- handleRequestVote :: RPCHandler ns sm RequestVote v
- handleRequestVoteResponse :: RPCHandler ns sm RequestVoteResponse v
- handleTimeout :: TimeoutHandler ns sm v
- handleClientRequest :: ClientReqHandler ns sm v
- followerRaftHandler :: Show v => RaftHandler Follower sm v
- candidateRaftHandler :: Show v => RaftHandler Candidate sm v
- leaderRaftHandler :: Show v => RaftHandler Leader sm v
- mkRaftHandler :: forall ns sm v. Show v => NodeState ns -> RaftHandler ns sm v
- handleEvent' :: forall ns sm v. (RSMP sm v, Show v) => NodeState ns -> TransitionEnv sm -> PersistentState -> Event v -> ((ResultState ns, [LogMsg]), PersistentState, [Action sm v])
Documentation
handleEvent :: forall sm v. (RSMP sm v, Show v) => RaftNodeState -> TransitionEnv sm -> PersistentState -> Event v -> (RaftNodeState, PersistentState, [Action sm v], [LogMsg]) Source #
Main entry point for handling events
data RaftHandler ns sm v Source #
RaftHandler | |
|
followerRaftHandler :: Show v => RaftHandler Follower sm v Source #
candidateRaftHandler :: Show v => RaftHandler Candidate sm v Source #
leaderRaftHandler :: Show v => RaftHandler Leader sm v Source #
mkRaftHandler :: forall ns sm v. Show v => NodeState ns -> RaftHandler ns sm v Source #
handleEvent' :: forall ns sm v. (RSMP sm v, Show v) => NodeState ns -> TransitionEnv sm -> PersistentState -> Event v -> ((ResultState ns, [LogMsg]), PersistentState, [Action sm v]) Source #