basho / riak-erlang-client

The Riak client for Erlang.
Apache License 2.0
311 stars 188 forks source link

Add riakc_datatype:context/1 function #362

Open manifest opened 7 years ago

manifest commented 7 years ago

Context value of CRDT object could be useful for operations like calculating HTTP Etag. Currently, the only way to retrieve context is to deal with internal representation of CRDT object.

{map,_,_,_,Context} = Obj.

By adding riakc_datatype:context/1, we could make such operations much more reliable.

-callback context(datatype()) -> context().