DynamicSupervisor.Proxy (DynamicSupervisor Proxy v0.1.57)
View SourceStarts 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.
Summary
Functions
Uses DynamicSupervisor. Also either aliases DynamicSupervisor.Proxy (this
module) and requires the alias or imports DynamicSupervisor.Proxy. Finally
it will inject the default implementation of the DynamicSupervisor.init/1
callback.
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.
Functions
Uses DynamicSupervisor. Also either aliases DynamicSupervisor.Proxy (this
module) and requires the alias or imports DynamicSupervisor.Proxy. Finally
it will inject the default implementation of the DynamicSupervisor.init/1
callback.
Examples
use DynamicSupervisor.Proxy, alias: Proxy
use 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.
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 :: Supervisor.on_start()
def start_link, 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)