gen_registry v1.0.1 GenRegistry.Behaviour behaviour View Source

GenRegistry.Behaviour defines the interface that a GenRegistry module should implement.

It is included to aid the development of replacement GenRegistry like implementations for special use cases or for testing.

Link to this section Summary

Link to this section Callbacks

Link to this callback lookup(arg0, arg1) View Source
lookup(:ets.tid(), GenRegistry.Types.id()) ::
  {:ok, pid()} | {:error, :not_found}
Link to this callback lookup_or_start(pid, arg1, args, timeout) View Source
lookup_or_start(
  pid(),
  GenRegistry.Types.id(),
  args :: [term()],
  timeout :: integer()
) :: {:ok, pid()} | {:error, term()}
Link to this callback reduce(arg0, term, function) View Source
reduce(:ets.tid(), term(), ({GenRegistry.Types.id(), pid()}, term() -> term())) ::
  term()
Link to this callback stop(pid, arg1) View Source
stop(pid(), GenRegistry.Types.id()) :: :ok | {:error, :not_found}