queue

package
v0.0.0-...-d8a4e70 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job interface {
	Handle(args ...any) error
}

type JobItem

type JobItem struct {
	Job   Job
	Args  []any
	Delay uint
}

type JobWithErrHandle

type JobWithErrHandle interface {
	Job
	ErrHandle(err error)
}

type Queue

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

func New

func New(bufferSize int) *Queue

func (*Queue) Bulk

func (r *Queue) Bulk(jobs []JobItem) error

func (*Queue) IsFull

func (r *Queue) IsFull() bool

func (*Queue) Later

func (r *Queue) Later(delay uint, job Job, args []any) error

func (*Queue) Len

func (r *Queue) Len() int

func (*Queue) Push

func (r *Queue) Push(job Job, args []any) error

func (*Queue) Run

func (r *Queue) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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