View Source DeltaCrdt.Storage behaviour (delta_crdt v0.6.5)

This behaviour can be used to enable persistence of the CRDT.

This can be helpful in the event of crashes.

To use, implement this behaviour in a module, and pass it to your CRDT with the storage_module option.

Summary

Types

@opaque storage_format()
@type t() :: module()

Callbacks

@callback read(name :: term()) :: storage_format() | nil
Link to this callback

write(name, storage_format)

View Source
@callback write(name :: term(), storage_format()) :: :ok