otq

package module
v0.0.0-...-b805e2f Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHandler

func AddHandler(taskTypeName string, handler asynq.HandlerFunc)

func AddScheduledTask

func AddScheduledTask(cronExpression string, task *asynq.Task)

func Close

func Close()

func Enqueue

func Enqueue(task *asynq.Task, opts ...asynq.Option)

func Start

func Start()

Types

type Logger

type Logger interface {
	Debug(args ...interface{})
	Info(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
	Panic(args ...interface{})
	Fatal(args ...interface{})
}

type Otq

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

func NewOtq

func NewOtq(redisAddress string, redisUsername string, redisPassword string, db int, logger ...Logger) *Otq

func (*Otq) AddHandler

func (o *Otq) AddHandler(taskTypeName string, handler asynq.HandlerFunc) *Otq

func (*Otq) AddScheduledTask

func (o *Otq) AddScheduledTask(cronExpression string, task *asynq.Task) *Otq

func (*Otq) Close

func (o *Otq) Close()

func (*Otq) Enqueue

func (o *Otq) Enqueue(task *asynq.Task, opts ...asynq.Option) *Otq

func (*Otq) Start

func (o *Otq) Start()

Jump to

Keyboard shortcuts

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