libraft-0.1.1.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 (ClientResponse sm)

Respond to client after a client request

ResetTimeoutTimer Timeout

Reset a timeout timer

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

Defined in Raft.Monad

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 v, Show sm) => 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 #

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

Defined in Raft.Monad