Raxol.Core.Runtime.Plugins.Loader.Behaviour behaviour (Raxol v0.3.0)

View Source

Defines the behaviour for plugin loading functionality.

This behaviour is responsible for:

  • Loading plugin modules
  • Initializing plugins with configuration
  • Verifying plugin implementations
  • Managing plugin metadata

Summary

Callbacks

Verifies if a module implements a specific behaviour.

Initializes a plugin with the given configuration.

Loads plugin metadata from a module.

Loads a plugin module and verifies it implements the required behaviour.

Callbacks

behaviour_implemented?(module, behaviour)

@callback behaviour_implemented?(module :: module(), behaviour :: module()) :: boolean()

Verifies if a module implements a specific behaviour.

initialize_plugin(module, config)

@callback initialize_plugin(module :: module(), config :: map()) ::
  {:ok, map()} | {:error, any()}

Initializes a plugin with the given configuration.

load_plugin_metadata(module)

@callback load_plugin_metadata(module :: module()) :: {:ok, map()} | {:error, any()}

Loads plugin metadata from a module.

load_plugin_module(module)

@callback load_plugin_module(module :: module()) :: {:ok, module()} | {:error, any()}

Loads a plugin module and verifies it implements the required behaviour.