Raxol.Plugins.Manager.State (Raxol v0.3.0)

View Source

Handles plugin state management and updates. Provides functions for updating plugin state and managing plugin lifecycle states.

Summary

Functions

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

Loads multiple plugins in the correct dependency order. Delegates to Raxol.Plugins.Lifecycle.load_plugins/2.

Updates the state of a specific plugin within the manager. The update_fun receives the current plugin state and should return the new state.

Functions

disable_plugin(manager, name)

Disables a plugin by name. Delegates to Raxol.Plugins.Lifecycle.disable_plugin/2.

enable_plugin(manager, name)

Enables a plugin by name. Delegates to Raxol.Plugins.Lifecycle.enable_plugin/2.

load_plugin(manager, module, config \\ %{})

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

load_plugins(manager, modules)

Loads multiple plugins in the correct dependency order. Delegates to Raxol.Plugins.Lifecycle.load_plugins/2.

unload_plugin(manager, name)

Unloads a plugin by name. Delegates to Raxol.Plugins.Lifecycle.unload_plugin/2.

update_plugin(manager, name, update_fun)

Updates the state of a specific plugin within the manager. The update_fun receives the current plugin state and should return the new state.