Poller v0.1.0 Poller View Source

Creates Poller instances which sends a :call message to a given list of processes at the provided interval. These processes are queried by a given registry_key in the duplicate key registry, Poller.ProcessRegistry.

Link to this section Summary

Functions

Create new poller server instance with given label as name.

Registers a process for future :call callbacks

Link to this section Functions

Link to this function

create_poller(label, registry_key, interval)

View Source

Create new poller server instance with given label as name.

The Poller server instance will use the registry_key to lookup pids registered in the ProcessRegistry and send a :call message to the process at the provided interval in milliseconds.

Link to this function

register(registry_key)

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

Registers a process for future :call callbacks