queue

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JobMutex     sync.RWMutex
	JobConfigMap = map[string]JobConfig{}
)

Functions

func CloseClient

func CloseClient() error

func GetClient

func GetClient() (*asynq.Client, error)

func RegisterJob

func RegisterJob(name string, config JobConfig)

func StartQueue

func StartQueue() error

Types

type Executor

type Executor interface {
	Execute(ctx context.Context, task *asynq.Task) error
}

type JobConfig

type JobConfig struct {
	Name     string
	Priority int
	Executor Executor
}

type QueueConfig

type QueueConfig struct {
	Enable   bool
	Host     string
	Port     string
	Password string
	DB       int
}
var LightQueueConfig *QueueConfig

Jump to

Keyboard shortcuts

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