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

Link to this section Functions

Link to this macro

child_spec(p1, p2)

View Source (macro)

cloned from Supervisor.child_spec/2

Link to this macro

count_children(p1)

View Source (macro)

cloned from Supervisor.count_children/1

Link to this macro

delete_child(p1, p2)

View Source (macro)

cloned from Supervisor.delete_child/2

cloned from Supervisor.init/2

Link to this macro

restart_child(p1, p2)

View Source (macro)

cloned from Supervisor.restart_child/2

Link to this macro

start_child(p1, p2)

View Source (macro)

cloned from Supervisor.start_child/2

Link to this macro

start_link(module, init_state, opts \\ [])

View Source (macro)

starts a Supervisor, linked to the calling function.

cloned from Supervisor.stop/1

cloned from Supervisor.stop/2

Link to this macro

stop(p1, p2, p3)

View Source (macro)

cloned from Supervisor.stop/3

Link to this macro

terminate_child(p1, p2)

View Source (macro)

cloned from Supervisor.terminate_child/2

Link to this macro

which_children(p1)

View Source (macro)

cloned from Supervisor.which_children/1