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