Raxol.Core.Runtime.Plugins.Manager (Raxol v0.2.0)

View Source

Manages the loading, initialization, and lifecycle of plugins in the Raxol runtime.

This module is responsible for:

  • Discovering available plugins
  • Loading and initializing plugins
  • Managing plugin lifecycle events
  • Providing access to loaded plugins
  • Handling plugin dependencies and conflicts

Summary

Functions

Returns a specification to start this module under a supervisor.

Disable a plugin temporarily without unloading it.

Enable a plugin that was previously disabled.

Placeholder for allowing plugins to filter events.

Get a specific plugin by its ID.

Initialize the plugin system and load all available plugins.

Get a list of all loaded plugins with their metadata.

Load a plugin with a given configuration.

Reload a plugin by unloading and then loading it again.

Starts the plugin manager process.

Types

plugin_id()

@type plugin_id() :: String.t()

plugin_metadata()

@type plugin_metadata() :: map()

plugin_state()

@type plugin_state() :: map()

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

disable_plugin(plugin_id)

Disable a plugin temporarily without unloading it.

enable_plugin(plugin_id)

Enable a plugin that was previously disabled.

filter_event(plugin_manager_state, event)

@spec filter_event(any(), Raxol.Core.Runtime.Events.Event.t()) ::
  {:ok, Raxol.Core.Runtime.Events.Event.t()} | :halt | any()

Placeholder for allowing plugins to filter events.

get_plugin(plugin_id)

Get a specific plugin by its ID.

initialize()

Initialize the plugin system and load all available plugins.

list_plugins()

Get a list of all loaded plugins with their metadata.

load_plugin(plugin_id, config)

Load a plugin with a given configuration.

reload_plugin(plugin_id)

Reload a plugin by unloading and then loading it again.

start_link(opts \\ [])

Starts the plugin manager process.