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

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

Summary

Types

Schema indentifier.

Types

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

Schema indentifier.

Callbacks

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