queue

package
v0.0.0-...-67e2984 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	Open(options map[string]any) (Queue, error)
}

type Job

type Job struct {
	JobInterface
	// contains filtered or unexported fields
}

func (*Job) GetModel

func (j *Job) GetModel() Queueable

func (*Job) Release

func (j *Job) Release(delay time.Duration)

func (*Job) SetModel

func (j *Job) SetModel(model Queueable)

type JobInterface

type JobInterface interface {
	SetModel(Queueable)
	GetModel() Queueable
	GetDelay() time.Duration
	GetMaxAttempts() int
	GetRetryDelay() time.Duration
	Handle() error
	Failed(error)
}

type Queue

type Queue interface {
	Empty() bool
	Count() int64
	Enqueue(JobInterface)
	Dequeue() JobInterface
	Remove(JobInterface)
	Ack(JobInterface)
	Release(JobInterface, time.Duration)
}

type Queueable

type Queueable interface {
	GetID() string
	GetQueue() string
	GetPayload() JobInterface
	GetAttempts() int
}

Jump to

Keyboard shortcuts

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