avrora v0.11.0 Avrora.Storage behaviour View Source

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

Link to this section Summary

Types

Schema indentifier.

Link to this section Types

Link to this type

schema_id()

View Source
schema_id() :: String.t() | integer()

Schema indentifier.

Link to this section Callbacks

Link to this callback

get(key)

View Source
get(key :: schema_id()) ::
  {:ok, result :: nil | Avrora.Schema.t()} | {:error, reason :: term()}
Link to this callback

put(key, value)

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