taskqueue

package
v0.49.0-rc.11 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

func New

func New(workers, queueSize, historySize int, log *logger.Logger) *Scheduler

func (*Scheduler) Abort

func (s *Scheduler) Abort(ctx context.Context, id string)

func (*Scheduler) Close

func (s *Scheduler) Close(ctx context.Context) error

func (*Scheduler) Get

func (s *Scheduler) Get(id string) Task

func (*Scheduler) List

func (s *Scheduler) List() []string

func (*Scheduler) Submit

func (s *Scheduler) Submit(ctx context.Context, id string, properties map[string]string, fn TaskFunc) error

type Task

type Task struct {
	Status     TaskStatus
	Error      error
	Properties map[string]string
	// contains filtered or unexported fields
}

type TaskFunc

type TaskFunc func(ctx context.Context) error

type TaskStatus

type TaskStatus string
const (
	TaskQueued  TaskStatus = "Queued"
	TaskRunning TaskStatus = "Running"
	TaskDone    TaskStatus = "Done"
	TaskFailed  TaskStatus = "Failed"
	TaskUnknown TaskStatus = "Unknown"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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