Mob.Plugins.Supervisor (mob v0.7.0)

Copy Markdown View Source

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 (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 (see Mob.Plugins.start_lifecycle/0).

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(arg)

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