task

package module
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package task is the public facade over the task lifecycle module (ADR-0016): the Task record, the Status state machine, and the sentinel errors. The implementation stays internal; this package pins the names.

Index

Constants

View Source
const (
	Pending   = internaltask.Pending
	Running   = internaltask.Running
	Completed = internaltask.Completed
	Dead      = internaltask.Dead
	Cancelled = internaltask.Cancelled
)

Status values.

View Source
const DefaultMaxAttempts = internaltask.DefaultMaxAttempts

Retry default.

Variables

View Source
var (
	ErrNotFound          = internaltask.ErrNotFound
	ErrLeaseNotHeld      = internaltask.ErrLeaseNotHeld
	ErrDuplicateID       = internaltask.ErrDuplicateID
	ErrInvalidTransition = internaltask.ErrInvalidTransition
)

Sentinel errors.

View Source
var (
	AllStatuses      = internaltask.AllStatuses
	CanTransitionTo  = internaltask.CanTransitionTo
	Terminal         = internaltask.Terminal
	NewID            = internaltask.NewID
	StatusCountsView = internaltask.StatusCountsView
)

Lifecycle helpers.

StatusCountsMap lifts string-keyed per-status counts into the typed enum: the internal generic instantiated at the plain string key (a var alias — the parity gate's func→var rule; internal callers use the generic directly for upstream engines' foreign ~string Status types).

Functions

This section is empty.

Types

type ID

type ID = internaltask.ID

Task lifecycle.

type New

type New = internaltask.New

Task lifecycle.

type Status

type Status = internaltask.Status

Task lifecycle.

type Task

type Task = internaltask.Task

Task lifecycle.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL