HareMq.DynamicSupervisor (hare_mq v1.0.2)
Summary
Functions
Returns a specification to start this module under a supervisor.
Initializes the dynamic supervisor with the specified options.
Starts a child worker process with the specified worker and options.
Functions
Link to this function
child_spec(arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function
init(opts)
Initializes the dynamic supervisor with the specified options.
It starts a Task to asynchronously run the start_consumers function and initializes the dynamic supervisor with a one_for_one restart strategy.
Examples
iex> HareMq.DynamicSupervisor.start_link([config: %{consumer_count: 3}, consume: MyApp.Consumer])
{:ok, #PID<0.123.0>}
Link to this function
start_child(list)
Starts a child worker process with the specified worker and options.
Examples
iex> HareMq.DynamicSupervisor.start_child(worker: MyApp.Consumer, name: :consumer1, opts: [config: %{}, consume: MyApp.Consumer])
{:ok, #PID<0.124.0>}
Link to this function