multiverses v0.5.2 Multiverses.Supervisor View Source
This module is intended to be a drop-in replacement for Supervisor
.
It launches the supervisor and the supervisor unconditionally
inherits the :"$caller"
of whoever launched it.
Usage
This module should only be used when you are creating a custom module-based Supervisor.
Example:
defmodule MyApp.CustomSupervisor do
use Multiverses, with: Supervisor
use Supervisor
def start_link(arg, opts) do
Supervisor.start_link(__MODULE__, arg, opts)
end
@impl true
def init(_arg) do
children = [
... supervised children
]
Supervisor.init(children, strategy: :one_for_one)
end
end
Link to this section Summary
Functions
cloned from Supervisor.child_spec/2
cloned from Supervisor.count_children/1
cloned from Supervisor.delete_child/2
cloned from Supervisor.init/2
cloned from Supervisor.restart_child/2
cloned from Supervisor.start_child/2
starts a Supervisor, linked to the calling function.
cloned from Supervisor.stop/1
cloned from Supervisor.stop/2
cloned from Supervisor.stop/3
cloned from Supervisor.terminate_child/2
cloned from Supervisor.which_children/1
Link to this section Functions
cloned from Supervisor.child_spec/2
cloned from Supervisor.count_children/1
cloned from Supervisor.delete_child/2
cloned from Supervisor.init/2
cloned from Supervisor.restart_child/2
cloned from Supervisor.start_child/2
starts a Supervisor, linked to the calling function.
cloned from Supervisor.stop/1
cloned from Supervisor.stop/2
cloned from Supervisor.stop/3
cloned from Supervisor.terminate_child/2
cloned from Supervisor.which_children/1