type

TaskHandler

type TaskHandler[Input, Output any] func( TaskContext, Input, ) (Output, error)

Compiled typed durable-task handler.

Source core/task.go:49

@param context
The leased attempt, cancellation context, identity, and LocalAPI.
@param input
Strictly decoded task input for this definition.
@returns
Typed output, or a retryable/terminal error.

Handlers must honor cancellation and make external side effects idempotent because a process crash or lease expiry can cause another attempt.

Related types

  • TaskContext

    Request-scoped view of one leased durable-task attempt.