worker_tracker v0.4.1 WorkerTracker.RegistryHelper

A collection of helpers to manipulate registries.

Link to this section Summary

Types

The registry identifier

Functions

Send a payload to the given channel for all subscribers of the registry.

Get all registered instances from the WorkerTracker Registry.

Lookup an instance in the WorkerTracker Registry.

Construct a name via registry tuple for naming GenServer processes

Register an instance with the WorkerTracker InstanceRegistry.

Determine if the WorkerTracker Registry contains the given instance.

Link to this section Types

Link to this type

registry()

registry() :: atom()

The registry identifier

Link to this section Functions

Link to this function

dispatch(registry, channel, payload)

dispatch(registry(), String.t(), any()) :: :ok
dispatch(registry(), String.t(), any()) ::
  {:via, Registry, {registry(), String.t()}}

Send a payload to the given channel for all subscribers of the registry.

Link to this function

keys()

keys() :: [String.t()]

Get all registered instances from the WorkerTracker Registry.

Link to this function

lookup(instance)

lookup(String.t()) :: {pid(), String.t()}

Lookup an instance in the WorkerTracker Registry.

Link to this function

name_via_registry(registry, instance)

Construct a name via registry tuple for naming GenServer processes

Link to this function

notify(channel, payload)

Link to this function

register(instance)

register(String.t()) :: {:error, {:already_registered, pid()}} | {:ok, pid()}

Register an instance with the WorkerTracker InstanceRegistry.

Link to this function

registry_contains?(registry, instance)

registry_contains?(registry(), String.t()) :: true | false

Determine if the WorkerTracker Registry contains the given instance.