An in-memory Stevedore.Store backed by an Agent.
Intended for tests and ephemeral use. The store config is the agent pid returned by
start_link/1; the caller owns the process lifecycle (use start_supervised!/1 in tests).
Has no stable on-disk path, so local_path/2 returns :unsupported.
Summary
Functions
Returns a specification to start this module under a supervisor.
Starts the store. The returned pid is the config passed to the other callbacks.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link(keyword()) :: Agent.on_start()
Starts the store. The returned pid is the config passed to the other callbacks.
Examples
iex> {:ok, store} = Stevedore.Store.Memory.start_link([])
iex> d = Stevedore.Digest.compute("blob")
iex> Stevedore.Store.Memory.put(store, d, "blob")
:ok
iex> Stevedore.Store.Memory.get(store, d)
{:ok, "blob"}