Kvasir.Agent.Cache behaviour (kvasir_agent v0.0.13) View Source
Link to this section Summary
Link to this section Types
Specs
ref() :: term()
Link to this section Callbacks
Specs
cache(agent :: module(), partition :: non_neg_integer(), id :: term()) :: {:ok, ref()}
Specs
Specs
init(agent :: module(), partition :: non_neg_integer(), opts :: Keyword.t()) :: :ok | {:ok, map()}
Specs
load(ref()) :: {:ok, Kvasir.Offset.t(), map()} | :no_previous_state | {:error, atom()}
Specs
save(cache :: ref(), data :: map(), offset :: Kvasir.Offset.t()) :: :ok | {:error, atom()}
Specs
stream(agent :: module()) :: Enumerable.t()