type

TaskResult

Typed local status view for one durable task.

Properties

PropertyTypeDescription
IDstringThe durable task identity.
SlugstringThe registered task definition slug.
QueuestringThe selected worker queue.
Statestore.TaskStateThe current durable lifecycle state.
AttemptsintThe number of attempts already started.
MaxAttemptsintThe maximum number of attempts captured at admission.
LastErrorCodestringThe stable last failure category.
LastErrorstringThe bounded last handler failure message. Handlers must not return secrets in errors.
CreatedAttime.TimeWhen the task was admitted.
UpdatedAttime.TimeWhen the durable record last changed.
CompletedAt*time.TimeWhen the task reached a terminal state.
OutputOutputStrictly decoded typed output after success.
HasOutputboolDistinguishes valid zero/null output from a task that has not succeeded.

Full signature

type TaskResult[Output any] struct { ID string Slug string Queue string State store.TaskState Attempts int MaxAttempts int LastErrorCode string LastError string CreatedAt time.Time UpdatedAt time.Time CompletedAt *time.Time Output Output HasOutput bool }

Source core/task.go:236