Drax v0.1.0 Drax.GCounter View Source

Grow only counter CRDT.

Link to this section Summary

Functions

Determine if a counter is equivalent to another counter or an integer

Increments the counter for this node by the given delta. If this is the first increment operation for this node then the count defaults to the delta

Merges 2 counters together taking the highest value seen for each node

Returns a new counter

Convert a counter to an integer

Link to this section Functions

Determine if a counter is equivalent to another counter or an integer

Link to this function

increment(counter, node \\ 1, delta \\ 1) View Source

Increments the counter for this node by the given delta. If this is the first increment operation for this node then the count defaults to the delta.

Merges 2 counters together taking the highest value seen for each node.

Returns a new counter

Convert a counter to an integer.