# `SiteMaps.Adapters.Memory`
[🔗](https://github.com/marcosgz/site_maps_ex/blob/v0.1.0/lib/site_maps/adapters/memory.ex#L1)

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.

# `object`

```elixir
@type object() :: {binary(), SiteMaps.Adapter.write_meta()}
```

# `server`

```elixir
@type server() :: Agent.agent()
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `dump`

```elixir
@spec dump(server()) :: %{required(String.t()) =&gt; object()}
```

Stored objects as a map of key to `{binary, meta}`.

# `history`

```elixir
@spec history(server()) :: [{:write | :delete, String.t()}]
```

Writes and deletes in chronological order, as `{:write | :delete, key}`.

# `start_link`

```elixir
@spec start_link(keyword()) :: Agent.on_start()
```

Starts an empty store. Accepts `name:`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
