Manages the full lifecycle of plugins in Voile.
Uses an ETS table for the plugin registry so active?/1 and status/1
are concurrent reads with no GenServer bottleneck. State-changing operations
(install, activate, etc.) go through GenServer calls.
Plugin States
:installed → on_install/0 ran, migrations done, not yet active
:active → on_activate/0 ran, hooks registered, fully running
:inactive → on_deactivate/0 ran, hooks removed, data intact
:error → install or activate failed
:uninstalled → on_uninstall/0 ran, data optionally removedUsage
Voile.PluginManager.install("Elixir.VoileLockerLuggage")
Voile.PluginManager.activate("Elixir.VoileLockerLuggage")
Voile.PluginManager.deactivate("Elixir.VoileLockerLuggage")
Voile.PluginManager.uninstall("Elixir.VoileLockerLuggage", remove_data: true)
Summary
Functions
Activate an installed plugin (registers hooks).
Check if a plugin is currently active.
Returns a specification to start this module under a supervisor.
Deactivate a plugin (removes hooks, keeps data).
Returns plugin modules that are loaded in the VM but not yet installed.
Install a plugin for the first time (runs migrations).
List only active plugin modules.
List all known plugins and their states.
Get the current status of a plugin. Accepts either an atom or a module string.
Uninstall a plugin.
Update a plugin to a new version. Runs on_update/2 with old and new version strings.
Functions
Activate an installed plugin (registers hooks).
Check if a plugin is currently active.
Returns a specification to start this module under a supervisor.
See Supervisor.
Deactivate a plugin (removes hooks, keeps data).
Returns plugin modules that are loaded in the VM but not yet installed.
Scans all started OTP applications, derives the likely root module name by
camelising the app atom (e.g. :voile_locker_luggage → VoileLockerLuggage),
tries to load it, and keeps those that implement the Voile.Plugin contract.
Filters out modules already recorded in the database.
Install a plugin for the first time (runs migrations).
List only active plugin modules.
List all known plugins and their states.
Get the current status of a plugin. Accepts either an atom or a module string.
Uninstall a plugin.
Options:
remove_data: true— calls on_uninstall/0 which drops tables. Default isfalse(keeps data, just marks as uninstalled).
Update a plugin to a new version. Runs on_update/2 with old and new version strings.