libraft-0.5.0.0: Raft consensus algorithm

Safe HaskellNone
LanguageHaskell2010

Raft.Action

Documentation

data Action sm v Source #

Constructors

SendRPC NodeId (SendRPCAction v)

Send a message to a specific node id

SendRPCs (Map NodeId (SendRPCAction v))

Send a unique message to specific nodes in parallel

BroadcastRPC NodeIds (SendRPCAction v)

Broadcast the same message to all nodes

AppendLogEntries (Entries v)

Append entries to the replicated log

RespondToClient ClientId (ClientRespSpec sm v)

Respond to client after a client request

ResetTimeoutTimer Timeout

Reset a timeout timer

UpdateClientReqCacheFrom Index

Update the client request cache from the given index onward

Instances
RaftLogger v (RWS (TransitionEnv sm v) [Action sm v] PersistentState) Source # 
Instance details

Defined in Raft.Transition

MonadWriter [Action sm v] (TransitionM sm v) Source # 
Instance details

Defined in Raft.Transition

Methods

writer :: (a, [Action sm v]) -> TransitionM sm v a #

tell :: [Action sm v] -> TransitionM sm v () #

listen :: TransitionM sm v a -> TransitionM sm v (a, [Action sm v]) #

pass :: TransitionM sm v (a, [Action sm v] -> [Action sm v]) -> TransitionM sm v a #

(Show sm, Show v, Show (RaftStateMachinePureError sm v)) => Show (Action sm v) Source # 
Instance details

Defined in Raft.Action

Methods

showsPrec :: Int -> Action sm v -> ShowS #

show :: Action sm v -> String #

showList :: [Action sm v] -> ShowS #