In-memory storage backed by an Agent, meant for tests.
{:ok, pid} = SiteMaps.Adapters.Memory.start_link()
adapter: {SiteMaps.Adapters.Memory, pid: pid}Use name: instead of pid: to address a named instance. dump/1 returns the
stored objects and history/1 the writes and deletes in the order they happened.
Summary
Functions
Returns a specification to start this module under a supervisor.
Stored objects as a map of key to {binary, meta}.
Writes and deletes in chronological order, as {:write | :delete, key}.
Starts an empty store. Accepts name:.
Types
@type object() :: {binary(), SiteMaps.Adapter.write_meta()}
@type server() :: Agent.agent()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Stored objects as a map of key to {binary, meta}.
Writes and deletes in chronological order, as {:write | :delete, key}.
@spec start_link(keyword()) :: Agent.on_start()
Starts an empty store. Accepts name:.