redis

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

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

Go to latest
Published: Sep 3, 2023 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPollPeriod = time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

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

func New

func New(o Options, lo logf.Logger) *Broker

func (*Broker) Consume

func (b *Broker) Consume(ctx context.Context, work chan []byte, queue string)

func (*Broker) Enqueue

func (b *Broker) Enqueue(ctx context.Context, msg []byte, queue string) error

func (*Broker) EnqueueScheduled

func (b *Broker) EnqueueScheduled(ctx context.Context, msg []byte, queue string, ts time.Time) error

func (*Broker) GetPending

func (r *Broker) GetPending(ctx context.Context, queue string) ([]string, error)

type Options

type Options struct {
	Addrs        []string
	Password     string
	DB           int
	DialTimeout  time.Duration
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	IdleTimeout  time.Duration
	MinIdleConns int
	PollPeriod   time.Duration
}

Jump to

Keyboard shortcuts

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