multiverses v0.7.0 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