View Source Hammer.Backend behaviour (hammer v6.2.1)
The backend Behaviour module.
Summary
Types
@type bucket_info() :: {key :: bucket_key(), count :: integer(), created :: integer(), updated :: integer()}
Callbacks
@callback count_hit( pid :: pid(), key :: bucket_key(), now :: integer() ) :: {:ok, count :: integer()} | {:error, reason :: any()}
@callback get_bucket( pid :: pid(), key :: bucket_key() ) :: {:ok, info :: bucket_info()} | {:ok, nil} | {:error, reason :: any()}