# `Imison.Registry`
[🔗](https://github.com/elpikel/imison/blob/v0.1.0/lib/imison/registry.ex#L1)

Local process storage for Imison instances.

# `key`

```elixir
@type key() :: Imison.name() | {Imison.name(), role()}
```

# `role`

```elixir
@type role() :: term()
```

# `value`

```elixir
@type value() :: term()
```

# `config`

```elixir
@spec config(Imison.name()) :: Imison.Config.t()
```

Fetch the config of a running Imison instance, raising when none runs under that name.

## Example

    Imison.Registry.config(Imison)

# `lookup`

```elixir
@spec lookup(Imison.name(), role()) :: nil | {pid(), value()}
```

Find the `{pid, value}` pair registered for an Imison supervisor or one of its processes.

Returns `nil` when nothing is registered under that name and role, including when
`Imison.Registry` itself isn't running (the `:imison` application isn't started)
and when the registered process has exited but the registry hasn't removed its
entry yet.

## Example

    Imison.Registry.lookup(Imison, Imison.Capture.Worker)

# `via`

```elixir
@spec via(Imison.name(), role(), value()) ::
  {:via, Registry, {Imison.Registry, key()} | {Imison.Registry, key(), value()}}
```

Build a via tuple for an Imison supervisor or one of its processes, registering `value` with it.

## Example

    Imison.Registry.via(Imison, nil, config)

---

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