View Source Avrora.Storage behaviour (avrora v0.30.1)

Behavior for storing and retrieving schemas by name or integer ID.

Summary

Types

Schema indentifier.

Types

schema_id()

@type schema_id() :: integer() | String.t()

Schema indentifier.

Callbacks

get(key)

@callback get(key :: schema_id()) ::
  {:ok, result :: nil | Avrora.Schema.t()} | {:error, reason :: term()}

put(key, value)

@callback put(key :: schema_id(), value :: Avrora.Schema.t()) ::
  {:ok, result :: Avrora.Schema.t()} | {:error, reason :: term()}