Raxol.Core.Runtime.Plugins.PluginMetadataProvider behaviour (Raxol v0.5.0)

View Source

Defines the behaviour for plugins that provide metadata like ID, version, and dependencies.

Plugins can optionally implement this behaviour to declare their metadata, which the plugin manager uses for dependency resolution and management.

Summary

Types

Represents the metadata for a plugin.

Callbacks

Callback invoked by the plugin manager to retrieve the plugin's metadata.

Types

metadata()

@type metadata() :: %{
  id: atom(),
  version: String.t(),
  dependencies: [{atom(), String.t()}]
}

Represents the metadata for a plugin.

  • id: A unique atom identifying the plugin (e.g., :my_plugin).
  • version: A string representing the plugin version (e.g., "0.1.0").
  • dependencies: A list of tuples {plugin_id, version_requirement} that this plugin depends on.

Callbacks

get_metadata()

@callback get_metadata() :: metadata()

Callback invoked by the plugin manager to retrieve the plugin's metadata.