DynamicSupervisor.Proxy (DynamicSupervisor Proxy v0.1.33) View Source

Starts a module-based dynamic supervisor process with a registered name. Will wait a bit if the supervisor name is still registered on restarts. See Supervisor restart backoff.

Link to this section Summary

Functions

Uses DynamicSupervisor. Also either aliases DynamicSupervisor.Proxy (this module) and requires the alias or imports DynamicSupervisor.Proxy.

Starts a module-based dynamic supervisor process with the given module and init_arg. The :name option must be given in order to register a supervisor name. Will wait a bit if the supervisor name is still registered on restarts. See Supervisor restart backoff.

Link to this section Functions

Link to this macro

__using__(options)

View Source (macro)

Uses DynamicSupervisor. Also either aliases DynamicSupervisor.Proxy (this module) and requires the alias or imports DynamicSupervisor.Proxy.

Examples

use DynamicSupervisor.Proxy, alias: Proxy

use DynamicSupervisor.Proxy
Link to this macro

start_link(module, init_arg, opts)

View Source (macro)

Starts a module-based dynamic supervisor process with the given module and init_arg. The :name option must be given in order to register a supervisor name. Will wait a bit if the supervisor name is still registered on restarts. See Supervisor restart backoff.

To start the supervisor, the DynamicSupervisor.init/1 callback will be invoked in the given module, with init_arg as its argument. The DynamicSupervisor.init/1 callback must return a supervisor specification which can be created with the help of the DynamicSupervisor.init/1 function.

Examples

use DynamicSupervisor.Proxy

@spec start_link(term) :: Supervisor.on_start()
def start_link(:ok), do: start_link(__MODULE__, :ok, name: __MODULE__)

@spec init(term) :: {:ok, DynamicSupervisor.sup_flags()} | :ignore
def init(:ok), do: DynamicSupervisor.init(strategy: :one_for_one)