Raxol.Core.Runtime.Plugins.PluginReloader.Behaviour behaviour (Raxol v0.3.0)
View SourceDefines the behaviour for plugin reloading functionality.
This behaviour is responsible for:
- Reloading plugins from disk
- Managing plugin reload state
- Handling plugin reload errors
- Coordinating plugin reload lifecycle
Summary
Callbacks
Checks if a plugin can be reloaded.
Coordinates the plugin reload lifecycle.
Gets the reload state of a plugin.
Handles plugin reload errors.
Callbacks
Checks if a plugin can be reloaded.
@callback coordinate_reload( plugin_id :: String.t(), plugins :: map(), metadata :: map(), plugin_states :: map(), load_order :: list(), command_table :: atom() ) :: {:ok, map()} | {:error, any()}
Coordinates the plugin reload lifecycle.
@callback get_reload_state( plugin_id :: String.t(), plugins :: map(), metadata :: map() ) :: {:ok, map()} | {:error, any()}
Gets the reload state of a plugin.
@callback handle_reload_error( plugin_id :: String.t(), error :: any(), plugins :: map(), metadata :: map(), plugin_states :: map() ) :: {:ok, map()} | {:error, any()}
Handles plugin reload errors.
@callback reload_plugin_from_disk( plugin_id :: String.t(), plugin_module :: module(), plugin_state :: map(), plugins :: map(), metadata :: map(), plugin_states :: map(), load_order :: list(), command_table :: atom() ) :: {:ok, map()} | {:error, any()}
Reloads a plugin from disk.