agency v0.3.1 TestAgency View Source
The Agent backing up the %{} instance.
Link to this section Summary
Functions
Returns a thing that might be used in Kernel.***_in
function family.
Returns a specification to start this module under a supervisor.
Get the value for the specific key from the container,
backed up by the Agent.
Get the value for the specific key from the container,
backed up by the Agent, and updates it.
Pops the value for the specific key in the container,
backed up by the Agent.
Put the value under the specific key to the container,
backed up by the Agent.
Returns the whole container, backed up by the Agent.
Update the value for the specific key in the container,
backed up by the Agent.
Link to this section Functions
Specs
access() :: Access.t()
Returns a thing that might be used in Kernel.***_in
function family.
Returns a specification to start this module under a supervisor.
See Supervisor.
Specs
get(GenServer.name(), Agency.keyz()) :: Agency.value()
Get the value for the specific key from the container,
backed up by the Agent.
Specs
get_and_update( GenServer.name(), Agency.keyz(), (Agency.value() -> {get_value, update_value} | :pop) ) :: {get_value, Access.container()} when get_value: Agency.value(), update_value: Agency.value()
Get the value for the specific key from the container,
backed up by the Agent, and updates it.
Specs
pop(GenServer.name(), Agency.keyz()) :: {Agency.value(), Access.container()}
Pops the value for the specific key in the container,
backed up by the Agent.
Specs
put(GenServer.name(), Agency.keyz(), Agency.value()) :: :ok
Put the value under the specific key to the container,
backed up by the Agent.
Specs
start_link(opts :: keyword()) :: GenServer.on_start()
Starts the Agent that backs up the container
(defaulted to Map.)
The argument passed to the function is ignored.
Specs
this(GenServer.name()) :: Access.t()
Returns the whole container, backed up by the Agent.
Specs
update(GenServer.name(), Agency.keyz(), (Agency.value() -> Agency.value())) :: :ok
Update the value for the specific key in the container,
backed up by the Agent.