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
Link to this function
equal(c1, num) View Source
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.
Link to this function
merge(c1, c2) View Source
Merges 2 counters together taking the highest value seen for each node.
Returns a new counter
Link to this function
to_i(counter) View Source
Convert a counter to an integer.