Raxol.Plugins.Manager.Core (Raxol v0.5.0)

View Source

Core functionality for the plugin manager. Handles basic plugin management operations and state.

Summary

Functions

Gets the current API version of the plugin manager.

Gets a plugin by name.

Gets a list of all loaded plugins.

Loads a plugin module and initializes it. Delegates to Raxol.Plugins.Lifecycle.load_plugin/3.

Loads a plugin module with specific configuration and initializes it. Delegates to Raxol.Plugins.Lifecycle.load_plugin/3.

Returns a map of loaded plugin names to plugin structs (for test compatibility).

Creates a new plugin manager with default configuration.

Updates the configuration in the manager.

Updates the plugins map in the manager and keeps loaded_plugins in sync.

Types

t()

@type t() :: %Raxol.Plugins.Manager.Core{
  api_version: String.t(),
  config: map(),
  event_handler: function() | nil,
  loaded_plugins: %{required(String.t()) => Raxol.Plugins.Plugin.t()},
  metadata: map(),
  plugin_config: Raxol.Plugins.PluginConfig.t(),
  plugin_states: %{required(String.t()) => any()},
  plugins: %{required(String.t()) => Raxol.Plugins.Plugin.t()}
}

Functions

get_api_version(manager)

Gets the current API version of the plugin manager.

get_plugin(manager, name)

Gets a plugin by name.

list_plugins(manager)

Gets a list of all loaded plugins.

load_plugin(manager, module)

Loads a plugin module and initializes it. Delegates to Raxol.Plugins.Lifecycle.load_plugin/3.

load_plugin(manager, module, config)

Loads a plugin module with specific configuration and initializes it. Delegates to Raxol.Plugins.Lifecycle.load_plugin/3.

loaded_plugins(manager)

Returns a map of loaded plugin names to plugin structs (for test compatibility).

new(opts \\ [])

Creates a new plugin manager with default configuration.

update_config(manager, config)

Updates the configuration in the manager.

update_plugins(manager, plugins)

Updates the plugins map in the manager and keeps loaded_plugins in sync.