Registry
This class resolves a pluginsCore.Plugin for a given task type by wrapping the global plugin registry. It wraps K8s plugins in a PluginManager and loads core plugins via their PluginLoader.
Methods
Initialize()
@classmethod
def Initialize(
ctx: context.Context
) - > error
Initializes the plugin registry with a given context. This method sets up the necessary context for plugins to operate.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the plugin initialization, used to carry deadlines, cancellation signals, and other request-scoped values. |
Returns
| Type | Description |
|---|---|
error | An error if the initialization fails, otherwise nil. |
ResolvePlugin()
@classmethod
def ResolvePlugin(
taskType: string
) - > (pluginsCore.Plugin, error)
Resolves and returns a plugin for a given task type. Callers use this to obtain the correct plugin instance to handle a specific task.
Parameters
| Name | Type | Description |
|---|---|---|
| taskType | string | The string identifier for the type of task for which a plugin is required. |
Returns
| Type | Description |
|---|---|
(pluginsCore.Plugin, error) | The resolved plugin instance and an error if no plugin is found for the given task type. |