ExAtlas.Fly.Supervisor (ExAtlas v0.5.0)

Copy Markdown View Source

Top-level supervisor for the Fly platform-ops sub-tree.

ExAtlas.Application boots this automatically when :ex_atlas starts and config :ex_atlas, :fly, enabled: true (the default). Hosts that want to embed ExAtlas under their own application tree — e.g. to delay its start, or because they've disabled the :ex_atlas OTP app via included_applications — can drop this module into their own supervisor instead:

# In MyApp.Application.start/2
children = [
  MyApp.Repo,
  MyAppWeb.Endpoint,
  ExAtlas.Fly.Supervisor
]

Supervisor.start_link(children, strategy: :one_for_one)

The set of children started is identical to what ExAtlas.Application starts for the Fly sub-tree:

Options are read from Application.get_env(:ex_atlas, :fly, []) — so the host can configure Fly the normal way even when starting the tree manually.

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts \\ [])