Raxol.Plugin.API (Raxol Plugin v2.6.0)

Copy Markdown View Source

Public API facade for plugin management operations.

Delegates to Raxol.Core.Runtime.Plugins.PluginManager with graceful error handling when the manager process is not running.

Usage

Raxol.Plugin.API.load(MyPlugin, %{option: "value"})
Raxol.Plugin.API.enable(:my_plugin)
Raxol.Plugin.API.list()

Summary

Functions

Disables a plugin without unloading it.

Enables a loaded plugin.

Gets a plugin entry by ID.

Gets the runtime state of a plugin.

Lists all registered plugins.

Loads a plugin module with optional configuration.

Checks whether a plugin is currently loaded.

Reloads a plugin (unload + load).

Unloads a plugin by ID.

Types

plugin_id()

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

Functions

disable(plugin_id)

@spec disable(plugin_id()) :: :ok | {:error, term()}

Disables a plugin without unloading it.

enable(plugin_id)

@spec enable(plugin_id()) :: :ok | {:error, term()}

Enables a loaded plugin.

get(plugin_id)

@spec get(plugin_id()) :: map() | nil | {:error, term()}

Gets a plugin entry by ID.

get_state(plugin_id)

@spec get_state(plugin_id()) :: term() | {:error, term()}

Gets the runtime state of a plugin.

list()

@spec list() :: [map()] | {:error, term()}

Lists all registered plugins.

load(module, config \\ %{})

@spec load(module(), map()) :: :ok | {:error, term()}

Loads a plugin module with optional configuration.

loaded?(plugin_id)

@spec loaded?(plugin_id()) :: boolean() | {:error, term()}

Checks whether a plugin is currently loaded.

reload(plugin_id)

@spec reload(plugin_id()) :: :ok | {:error, term()}

Reloads a plugin (unload + load).

unload(plugin_id)

@spec unload(plugin_id()) :: :ok | {:error, term()}

Unloads a plugin by ID.