libraft-0.1.1.0: Raft consensus algorithm

Safe HaskellNone
LanguageHaskell2010

Raft.Persistent

Synopsis

Documentation

data PersistentState Source #

Persistent state that all Raft nodes maintain, regardless of node state.

Constructors

PersistentState 

Fields

Instances
Show PersistentState Source # 
Instance details

Defined in Raft.Persistent

Generic PersistentState Source # 
Instance details

Defined in Raft.Persistent

Associated Types

type Rep PersistentState :: Type -> Type #

Serialize PersistentState Source # 
Instance details

Defined in Raft.Persistent

MonadState PersistentState (TransitionM sm v) Source # 
Instance details

Defined in Raft.Monad

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

Defined in Raft.Monad

type Rep PersistentState Source # 
Instance details

Defined in Raft.Persistent

type Rep PersistentState = D1 (MetaData "PersistentState" "Raft.Persistent" "libraft-0.1.1.0-8nwazCMBvi7EUIW9UIbZhF" False) (C1 (MetaCons "PersistentState" PrefixI True) (S1 (MetaSel (Just "currentTerm") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Term) :*: S1 (MetaSel (Just "votedFor") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe NodeId))))

initPersistentState :: PersistentState Source #

A node initiates its persistent state with term 0 and with its vote blank