Guides
v0.1.16
Each guide covers one task with Mishka Installer: write a plugin for an event, call an event and use its result, manage plugins while the app runs, override what a plugin does on start, restart and stop, install a library at runtime, ship and remove plugins with an installed library, deploy to production, and test plugins and events.
Pick the guide for the job in front of you. The pages below show each one with a short summary.
- Write a plugin for an event Declare a Mishka Installer plugin, set its priority and dependencies, write call/1 or call/2, halt the chain and start it in a supervisor.
- Call an event and use its result Call an event with Hook.call/3, pass meta and private data, keep your input with return, and choose the answer when plugins cannot run or raise.
- Manage plugins while the app runs Read, stop, enable, restart and unregister Mishka Installer plugins at runtime, wait for the rebuild, and check plugin health and timing.
- Override what a plugin does on start, restart and stop Override the functions Mishka Installer gives a plugin: add work to start, restart, stop and unregister, report health and react to a failed registration.
- Install a library at runtime Install a pre-built Elixir library into a running node from a folder, a URL or a GitHub release, pin it with a checksum and uninstall it.
- Ship and remove plugins with a runtime-installed library How a plugin in a runtime-installed library starts, what an upgrade or an uninstall leaves behind, how to clean up its records, and what changes in a cluster.
- Deploy to production Keep Mishka Installer plugins and installed libraries across restarts: point the data at a volume, supervise your plugins and run a cluster.
- Test plugins and events Test Mishka Installer plugins in ExUnit: what the library starts under test, project_env versus MIX_ENV, a temporary Mnesia folder and waiting for ready.