CounterEx v0.1.0 CounterEx.Keeper View Source

A "singleton" counter storage.

Link to this section Summary

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

get_all_values()

View Source
get_all_values() :: [tuple()]
Link to this function

get_value(key)

View Source
get_value(binary()) :: nil | integer()
Link to this function

increment(key, value \\ 1, default \\ 0)

View Source
increment(
  any(),
  [{integer(), integer()} | {integer(), integer(), integer(), integer()}]
  | integer()
  | {integer(), integer()}
  | {integer(), integer(), integer(), integer()},
  any()
) :: [integer()] | integer()

Callback implementation for GenServer.init/1.

Link to this function

reset(key, value \\ 0)

View Source
reset(binary(), integer()) :: boolean()
Link to this function

reset_all()

View Source
reset_all() :: true
Link to this function

set(key, value \\ 0)

View Source
set(binary(), integer()) :: boolean()
Link to this function

start_link(opts \\ [])

View Source
start_link(any()) :: :ignore | {:error, any()} | {:ok, pid()}