Agent-based registry for global plugins.
Stores initialized {module, state} tuples. Start as part of your
application supervision tree or manually with start_link/1.
Summary
Functions
Returns a specification to start this module under a supervisor.
Clear all registered plugins.
List all registered plugins as [{module, state}].
Register a plugin. Accepts a module or {module, config}.
Start the plugin registry.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec clear() :: :ok
Clear all registered plugins.
List all registered plugins as [{module, state}].
Register a plugin. Accepts a module or {module, config}.
Calls init/1 on the module if implemented, otherwise uses config as state.
@spec start_link(keyword()) :: Agent.on_start()
Start the plugin registry.