maca/crdt-replicated-tree/1.1.0

NOTE: the latest version is 5.0.0

Formerly maca/crdt-replicated-graph. Search finds this package by either name.

CRDTree.Operation

Represents an CRDTree operation

type Operation a
= Add ReplicaId Int (List Int) a
| Delete ReplicaId (List Int)
| Batch (List (Operation a))

Represents an CRDTree operation

Properties

timestamp : Operation a -> Maybe Int

Timestamp of the operation

path : Operation a -> Maybe (List Int)

Operation path

replicaId : Operation a -> Maybe Int

Id of the replica originating the operation

List

since : Int -> List (Operation a) -> List (Operation a)

Return operations since a timestamp

toList : Operation a -> List (Operation a)

List of operations

Manipulation

Merge two operations