WithTaskType
Gets a new context with TaskType set.
def WithTaskType(
ctx: context.Context,
taskType: string
) - > context.Context
Gets a new context with TaskType set. This function is used to associate a specific task type with a context, allowing downstream operations to identify and act upon the nature of the task.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The parent context to which the task type will be added. |
| taskType | string | The string representing the type of task to associate with the context. |
Returns
| Type | Description |
|---|---|
context.Context | A new context derived from the input context, with the specified task type value associated. |