View Source Avrora.Storage.Transient behaviour (avrora v0.28.0)

Storage behavior which allows keys to be removed or expired.

Summary

Types

Naive timestamp with second precision.

Types

@type timestamp() :: timeout()

Naive timestamp with second precision.

Callbacks

@callback delete(key :: Avrora.Storage.schema_id()) ::
  {:ok, result :: boolean()} | {:error, reason :: term()}
@callback expire(key :: Avrora.Storage.schema_id(), ttl :: timeout()) ::
  {:ok, timestamp :: timestamp()} | {:error, reason :: term()}
@callback flush() :: {:ok, result :: boolean()} | {:error, reason :: term()}