EchoPlugin
No overview available.
Methods
GetID()
@classmethod
def GetID() - > string
Fetches the unique identifier for the EchoPlugin. Callers use this to identify the plugin.
Returns
| Type | Description |
|---|---|
string | The unique string identifier of the plugin. |
GetProperties()
@classmethod
def GetProperties() - > core.PluginProperties
Retrieves the properties of the EchoPlugin. Callers use this to understand the plugin's capabilities and configuration.
Returns
| Type | Description |
|---|---|
core.PluginProperties | The properties object containing details about the plugin. |
addTask()
@classmethod
def addTask(
ctx: context.Context,
tCtx: core.TaskExecutionContext
) - > time.Time
Adds a new task to the EchoPlugin for tracking. This method records the start time of a task, which is used internally for managing task lifecycles.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and deadlines. |
| tCtx | core.TaskExecutionContext | The execution context of the task, containing task-specific information. |
Returns
| Type | Description |
|---|---|
time.Time | The time when the task was added. |
removeTask()
@classmethod
def removeTask(
taskExecutionID: string
) - > null
Removes a task from the EchoPlugin's internal tracking. Callers use this to indicate that a task is no longer active and its associated resources can be cleaned up.
Parameters
| Name | Type | Description |
|---|---|---|
| taskExecutionID | string | The unique identifier of the task to be removed. |
Returns
| Type | Description |
|---|---|
null | This method does not return any value. |
Handle()
@classmethod
def Handle(
ctx: context.Context,
tCtx: core.TaskExecutionContext
) - > (core.Transition, error)
Handles the execution of a task within the EchoPlugin. This method processes the task and determines its next state, potentially transitioning it to a new phase.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and deadlines. |
| tCtx | core.TaskExecutionContext | The execution context of the task, containing task-specific information. |
Returns
| Type | Description |
|---|---|
(core.Transition, error) | A tuple containing the next transition for the task and an error if the handling failed. |
Abort()
@classmethod
def Abort(
ctx: context.Context,
tCtx: core.TaskExecutionContext
) - > error
Aborts a running task managed by the EchoPlugin. Callers use this to prematurely stop a task's execution, typically due to external cancellation or failure.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and deadlines. |
| tCtx | core.TaskExecutionContext | The execution context of the task to be aborted. |
Returns
| Type | Description |
|---|---|
error | An error if the abort operation failed, otherwise nil. |
Finalize()
@classmethod
def Finalize(
ctx: context.Context,
tCtx: core.TaskExecutionContext
) - > error
Finalizes a task after its completion or abortion. This method performs any necessary cleanup or post-processing for the task.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and deadlines. |
| tCtx | core.TaskExecutionContext | The execution context of the task to be finalized. |
Returns
| Type | Description |
|---|---|
error | An error if the finalization process failed, otherwise nil. |