Safe Haskell | None |
---|---|
Language | Haskell98 |
CRDT operations
- Haskell-side
- Riak-side
get
to get a current valuesendModify
to ask Riak to apply modifications
TL;DR example
>>>
let c = Counter 41
>>>
let op = CounterInc 1
>>>
modify op c
Counter 42>>>
get conn "counters" "bucket" "key"
Just (DTCounter (Counter 41))>>>
sendModify conn "counters" "bucket" "key" [op] >> get conn "counters" "bucket" "key"
Just (DTCounter (Counter 42))
- module Network.Riak.CRDT.Types
- get :: Connection -> BucketType -> Bucket -> Key -> IO (Maybe DataType)
- class MapCRDT a => CRDT a op | a -> op, op -> a where
- modify :: op -> a -> a
- sendModify :: Connection -> BucketType -> Bucket -> Key -> [op] -> IO ()
Documentation
module Network.Riak.CRDT.Types
get :: Connection -> BucketType -> Bucket -> Key -> IO (Maybe DataType) Source