Raxol.Core.Runtime.Plugins.Lifecycle behaviour (Raxol v2.0.1)

View Source

Defines the behaviour for plugin lifecycle management.

Plugins that implement this behaviour will have their lifecycle events called during plugin loading and unloading.

Summary

Callbacks

Called when the plugin is started after initialization.

Called when the plugin is stopped before cleanup.

Callbacks

start(config)

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

Called when the plugin is started after initialization.

Should return {:ok, updated_config} or {:error, reason}. The updated_config will be stored in the plugin's configuration.

stop(config)

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

Called when the plugin is stopped before cleanup.

Should return {:ok, updated_config} or {:error, reason}. The updated_config will be stored in the plugin's configuration.