# `Mob.Plugins.Supervisor`
[🔗](https://github.com/genericjam/mob/blob/master/lib/mob/plugins/supervisor.ex#L1)

Supervises the tier-4 plugins' lifecycle.

On init it runs each plugin's `lifecycle.on_start` MFA in order (an error
return bubbles up and fails boot loud, per the spec), then supervises the
plugins' declared `lifecycle.supervised` child specs alongside the
`Mob.Plugins.Lifecycle` event dispatcher. Started from `Mob.App.start/0`
via `Mob.Plugins.start/0`, after the plugins' OTP applications (so an
`on_start` can rely on its own supervision tree and deps) and just before
the host's own `on_start/0` (so a host `on_start` that blocks on a run loop
can't starve plugin startup — the framework services a plugin's `on_start`
needs are already up), and only when a plugin declares a `:lifecycle`.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

```elixir
@spec start_link(term()) :: Supervisor.on_start()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
