Versions in this module Expand all Collapse all v1 v1.0.1 Jun 2, 2026 Changes in this version + type CloudTasksEnqueuer struct + func NewCloudTasksEnqueuer(client *cloudtasks.Client, cfg CloudTasksEnqueuerConfig) *CloudTasksEnqueuer + func (e *CloudTasksEnqueuer) EnqueueRun(ctx context.Context, ref ExecutionRef, delay time.Duration) error + type CloudTasksEnqueuerConfig struct + InvokerServiceAccountEmail string + Location string + OIDCAudience string + ProjectID string + Queue string + RunURL string + type Engine struct + func NewEngine(store Store, enq Enqueuer, reg *Registry, leaseTTL time.Duration) *Engine + func (e *Engine) Kick(ctx context.Context, kind, key string, wakeNow bool, delay time.Duration) error + func (e *Engine) RunOnce(ctx context.Context, ref ExecutionRef, owner string) (int, error) + type Enqueuer interface + EnqueueRun func(ctx context.Context, ref ExecutionRef, delay time.Duration) error + type Execution struct + Attempt int + Checkpoint string + Dirty bool + LastError string + LeaseOwner string + LeaseUntil time.Time + Ref ExecutionRef + Status ExecutionStatus + UpdatedAt time.Time + WaitReason string + WakeAt *time.Time + type ExecutionRef struct + Key string + Kind string + func (r ExecutionRef) ID() string + type ExecutionStatus string + const ExecutionStatusDone + const ExecutionStatusFailed + const ExecutionStatusQueued + const ExecutionStatusRunning + const ExecutionStatusWaiting + type Handler interface + Run func(ctx context.Context, exec Execution) (Outcome, error) + type Outcome struct + Checkpoint string + Delay time.Duration + Err error + Reason string + Type OutcomeType + func Done(checkpoint string) Outcome + func Fail(err error) Outcome + func Retry(err error) Outcome + func Wait(delay time.Duration, reason string, checkpoint string) Outcome + type OutcomeType string + const OutcomeDone + const OutcomeFail + const OutcomeRetry + const OutcomeWait + type Registry struct + func NewRegistry() *Registry + func (r *Registry) Get(kind string) (Handler, bool) + func (r *Registry) MustGet(kind string) Handler + func (r *Registry) Register(kind string, h Handler) + type Store interface + AcquireLease func(ctx context.Context, ref ExecutionRef, owner string, ttl time.Duration) (bool, Execution, error) + FinalizeAfterRun func(ctx context.Context, ref ExecutionRef) (bool, error) + Get func(ctx context.Context, ref ExecutionRef) (Execution, error) + MarkDone func(ctx context.Context, ref ExecutionRef, checkpoint string) error + MarkFailed func(ctx context.Context, ref ExecutionRef, errMsg string) error + MarkWaiting func(ctx context.Context, ref ExecutionRef, wakeAt time.Time, reason string, ...) error + UpsertQueued func(ctx context.Context, ref ExecutionRef, wakeNow bool) (bool, error)