Local process storage for Imison instances.
Summary
Functions
Fetch the config of a running Imison instance, raising when none runs under that name.
Find the {pid, value} pair registered for an Imison supervisor or one of its processes.
Build a via tuple for an Imison supervisor or one of its processes, registering value with it.
Types
@type key() :: Imison.name() | {Imison.name(), role()}
@type role() :: term()
@type value() :: term()
Functions
@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)
@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)
@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)