greyhound v0.1.0 Greyhound.Listeners
Registry for tracking listener processes.
Link to this section Summary
Functions
Registers a pid to a topic
Returns a specification to start this module under a supervisor
Returns a list of registered pids
Unregisters a process from a topic
Link to this section Functions
Registers a pid to a topic.
Once registered, a process will be linked and monitored by the registry. If a listener process is stopped it will automatically be removed.
Example
iex> add(MyApp.Bus, "a_topic", self())
:ok
Link to this function
child_spec(arg)
Returns a specification to start this module under a supervisor.
See Supervisor.
Returns a list of registered pids.
Example
iex> list(MyApp.Bus, "a_topic")
[#PID<0.173.0>, #PID<0.174.0>, #PID<0.175.0>]