Skip to main content

SyncPlugin

This interface defines the contract for plugins that interact with Web APIs synchronously. It provides methods to retrieve the plugin's configuration and to execute the primary action associated with the plugin.

Methods


GetConfig()

@classmethod
def GetConfig() - > [PluginConfig](pluginconfig.md?sid=flyteplugins_go_tasks_pluginmachinery_webapi_pluginconfig)

Gets the loaded plugin config. This will be used to control the interactions with the remote service.

Returns

TypeDescription
[PluginConfig](pluginconfig.md?sid=flyteplugins_go_tasks_pluginmachinery_webapi_pluginconfig)The loaded plugin configuration.

Do()

@classmethod
def Do(
ctx: context.Context,
tCtx: [TaskExecutionContext](taskexecutioncontext.md?sid=flyteplugins_go_tasks_pluginmachinery_webapi_taskexecutioncontext)
) - > tuple

Performs the action associated with this plugin.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the operation, typically used for cancellation signals and deadlines.
tCtx[TaskExecutionContext](taskexecutioncontext.md?sid=flyteplugins_go_tasks_pluginmachinery_webapi_taskexecutioncontext)The task execution context providing details about the current task.

Returns

TypeDescription
tupleA tuple containing the phase information and an error, if any.