worker

package
v0.0.0-...-fd78167 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTask

func AddTask(ctx context.Context, tasks ...Task)

Types

type Task

type Task interface {
	Run(ctx context.Context) error
}

type TaskName

type TaskName interface {
	Name() string
}

type TaskQueue

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

func (*TaskQueue) AddTask

func (a *TaskQueue) AddTask(t Task)

func (*TaskQueue) Name

func (a *TaskQueue) Name() string

func (*TaskQueue) NextTask

func (a *TaskQueue) NextTask() Task

func (*TaskQueue) Run

func (a *TaskQueue) Run() error

func (*TaskQueue) SetContext

func (a *TaskQueue) SetContext(key, value interface{}) *TaskQueue

func (*TaskQueue) Start

func (a *TaskQueue) Start() error

Jump to

Keyboard shortcuts

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