speed_test v0.1.0 SpeedTest.Page.Registry

Registry that contains state on running pages.

Link to this section Summary

Functions

Looks up a given page and returns the associated process.

Given a page with an id, will register the current process under that id.

Link to this section Functions

Link to this function

lookup(page)

lookup(atom() | %{id: any()}) ::
  {:error, :not_registered} | {:ok, {pid(), any()}}

Looks up a given page and returns the associated process.

Link to this function

register(page)

register(atom() | %{id: any()}) ::
  {:error, {:already_registered, pid()}} | {:ok, pid()}

Given a page with an id, will register the current process under that id.