method

TypedTask.Enqueue

func (task TypedTask[Input, Output]) Enqueue( ctx context.Context, application *App, input Input, options TaskEnqueueOptions, ) (TaskReceipt[Output], error)

Enqueue validates and durably stores typed input. The task must be the same slug/type contract registered in the running application's Config.Tasks.

Source core/task.go:254

@param ctx
The ctx value.
@param application
The application value.
@param input
The input value.
@param options
The options value.
@returns
The declared result.

Related types

  • TypedTask

    Compiled typed durable-task definition.

  • Input

    A presence-aware value used by nullable generated Go mutation fields.

  • App

    A resolved application bound to operation services.

  • TaskEnqueueOptions

    Admission and scheduling controls for one durable task.

  • TaskReceipt

    Stable typed handle returned after durable admission.