Gralkor.Reflection.Store behaviour (jido_gralkor v7.0.0)

Copy Markdown View Source

Stores and searches artefacts in destinations named by Reflections.

Summary

Callbacks

get(t, t, t)

@callback get(Gralkor.Reflection.t(), String.t(), String.t()) ::
  {:ok, Gralkor.Reflection.Artefact.t() | nil} | {:error, term()}

put(t, t, t)

@callback put(Gralkor.Reflection.t(), String.t(), Gralkor.Reflection.Artefact.t()) ::
  :ok | {:error, term()}

search(t, t, t, pos_integer)

@callback search(Gralkor.Reflection.t(), String.t(), String.t(), pos_integer()) ::
  {:ok, [Gralkor.Reflection.Artefact.t()]} | {:error, term()}

Functions

destination(reflection, operator_id)

put(reflection, operator_id, artefact, opts \\ [])

search(reflections, operator_id, name, query, opts \\ [])