function

NewTask

func NewTask[Input, Output any]( slug string, handler TaskHandler[Input, Output], options ...TaskOption, ) TypedTask[Input, Output]

Define one compiled typed durable task.

Source core/task.go:144

@param slug
Stable lowercase kebab-case task identity.
@param handler
Compiled idempotent handler.
@param options
Queue, retries, timeout, retention, and optional admission recovery.
@returns
A definition to register in Config.Tasks and use for typed runtime operations.

Related types