| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Raft.Types
Synopsis
- type NodeId = ByteString
- type NodeIds = Set NodeId
- newtype ClientId = ClientId NodeId
- newtype LeaderId = LeaderId {
- unLeaderId :: NodeId
- newtype Term = Term Natural
- term0 :: Term
- incrTerm :: Term -> Term
- prevTerm :: Term -> Term
- newtype Index = Index Natural
- index0 :: Index
- incrIndex :: Index -> Index
- decrIndexWithDefault0 :: Index -> Index
Documentation
type NodeId = ByteString #
Unique identifier of a Raft node
Unique identifier of a client
Unique identifier of a leader
Constructors
| LeaderId | |
Fields
| |
Representation of monotonic election terms
Representation of monotonic indices
decrIndexWithDefault0 :: Index -> Index #
Decrement index. If the given index is 0, return the given index