View Source Runbox.StateStore.Storage.BinaryStorage (runbox v21.2.0)

Runbox.StateStore.Storage behaviour implementation.

This implementation uses erlang built-in :erlang.term_to_binary/1 and :erlang.binary_to_term/1 functions to persist and restore run state.

Summary

Types

@type run_id() :: String.t()

Functions

Link to this function

decode_savepoint(binary_savepoint)

View Source
@spec decode_savepoint(binary()) ::
  {:ok, Runbox.StateStore.ScheduleUtils.epoch_ms(),
   [{Runbox.StateStore.Entity.id(), Runbox.StateStore.Entity.state()}]}
  | {:error, :corrupted_savepoint}
Link to this function

encode_savepoint(timestamp, entities)

View Source