exhtml v0.1.2 Exhtml.Registry

Registry holds information of mapping of PIDs to names.

Examples:

iex> Exhtml.Registry.start_link
...> Exhtml.Registry.register(:foo, :bar)
:ok
iex> Exhtml.Registry.whereis(:foo)
:bar

Summary

Functions

Registers a pid to name

Starts a registry process

Maps a name to PID

Functions

register(key, value)

Registers a pid to name.

  • key - the name of the PID.
  • value - the PID.
start_link(opts \\ [])
start_link([{:key, any}]) :: {:ok, pid} | {:error, any}

Starts a registry process.

  • opts - options for starting registry process.

    • name - set the process name
whereis(key)

Maps a name to PID.

  • key - the process name

Returns ths PID associated with the key, otherwise nil.