dq

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PriHigh   = 1
	PriNormal = 2
	PriLow    = 3
)

Variables

View Source
var ErrTimeBeforeNow = errors.New("can't schedule task to past time")

Functions

This section is empty.

Types

type Beanstalk

type Beanstalk struct {
	Endpoint string
	Tube     string
}

type Consume

type Consume func(body []byte)

type Consumer

type Consumer interface {
	Consume(consume Consume)
}

func NewConsumer

func NewConsumer(c DqConf) Consumer

type DqConf

type DqConf struct {
	Beanstalks []Beanstalk
	Redis      redis.RedisConf
}

type Producer

type Producer interface {
	At(body []byte, at time.Time) (string, error)
	Close() error
	Delay(body []byte, delay time.Duration) (string, error)
	Revoke(ids string) error
}

func NewProducer

func NewProducer(beanstalks []Beanstalk) Producer

func NewProducerNode

func NewProducerNode(endpoint, tube string) Producer

Jump to

Keyboard shortcuts

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