Snodo.Server.Supervisor (snodo v0.1.0)

Copy Markdown View Source

Optional supervision boundary for configured transport children.

Summary

Functions

Returns a specification to start this module under a supervisor.

Starts a :one_for_one supervisor with one child per configured transport.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

Starts a :one_for_one supervisor with one child per configured transport.

The child spec that use Snodo.Server defines starts this supervisor. It takes :transports and :supervisor_name (passed here as :name) along with runtime overrides.

Options:

  • :runtime - the Snodo.Server.Runtime given to every transport. Required.
  • :transports - the transport children. Defaults to []. Each entry is a module, started as {module, runtime: runtime}; a {module, opts} tuple, started with :runtime added to opts unless already present; or a child spec map, used as given.
  • :name - a name to register the supervisor under.