OT.Server v0.1.0 OT.Server.Adapter behaviour View Source

Link to this section Summary

Link to this section Types

Link to this type datum() View Source
datum() :: any
Link to this type operation() View Source
operation() :: OT.Operation.t
Link to this type version() View Source
version() :: pos_integer

Link to this section Callbacks

Link to this callback get_conflicting_operations(datum, version) View Source
get_conflicting_operations(datum, version) :: [{operation, version}]
Link to this callback get_datum(any) View Source
get_datum(any) :: {:ok, datum} | {:error, any}
Link to this callback handle_submit_error(any, any, op_vsn) View Source
handle_submit_error(any, any, op_vsn) ::
  :retry |
  {:error, any}
Link to this callback insert_operation(datum, {}, any) View Source
insert_operation(datum, {OT.Operation.t, version}, any) ::
  {:ok, any} |
  {:error, any}
Link to this callback rollback(any) View Source
rollback(any) :: no_return
Link to this callback transact(function) View Source
transact((... -> any)) :: {:ok, any} | {:error, any}
Link to this callback update_datum(datum, any) View Source
update_datum(datum, any) :: {:ok, datum} | {:error, any}