| 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 Source #
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
Instances
| Enum Index Source # | |
| Eq Index Source # | |
| Integral Index Source # | |
| Num Index Source # | |
| Ord Index Source # | |
| Real Index Source # | |
Defined in Raft.Types Methods toRational :: Index -> Rational # | |
| Show Index Source # | |
| Generic Index Source # | |
| Serialize Index Source # | |
| type Rep Index Source # | |
Defined in Raft.Types | |
decrIndexWithDefault0 :: Index -> Index Source #
Decrement index. If the given index is 0, return the given index