crdt-5.1: Conflict-free replicated data types
CRDT.Cv.GCounter
Contents
Synopsis
newtype GCounter a Source #
Grow-only counter.
Constructors
Instances
Methods
(==) :: GCounter a -> GCounter a -> Bool #
(/=) :: GCounter a -> GCounter a -> Bool #
showsPrec :: Int -> GCounter a -> ShowS #
show :: GCounter a -> String #
showList :: [GCounter a] -> ShowS #
(<>) :: GCounter a -> GCounter a -> GCounter a #
sconcat :: NonEmpty (GCounter a) -> GCounter a #
stimes :: Integral b => b -> GCounter a -> GCounter a #
See CvRDT
CvRDT
initial :: GCounter a Source #
Initial state
query :: Num a => GCounter a -> a Source #
Get value from the state
increment Source #
Arguments
replica id
Increment counter