Roger.Partition.Global.StatePersister behaviour (roger v3.1.1) View Source

Behaviour for the persistence of the global partition state.

See Roger.Partition.Global on how to implement a custom persister module.

Link to this section Summary

Callbacks

Called when the global state process starts.

Called when the global state needs to be loaded.

Called when the global state needs to be stored.

Link to this section Callbacks

Specs

init(id :: String.t()) :: :ok

Called when the global state process starts.

Specs

load(id :: String.t()) :: {:ok, binary()} | {:error, term()}

Called when the global state needs to be loaded.

Specs

store(id :: String.t(), data :: binary()) :: :ok

Called when the global state needs to be stored.