redis

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2023 License: BSD-2-Clause Imports: 6 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

type Options

type Options struct {
	Addrs        []string      `yaml:"addrs"`
	Password     string        `yaml:"password"`
	DB           int           `yaml:"db"`
	DialTimeout  time.Duration `yaml:"dial_timeout"`
	ReadTimeout  time.Duration `yaml:"read_timeout"`
	WriteTimeout time.Duration `yaml:"write_timeout"`
	IdleTimeout  time.Duration `yaml:"idle_timeout"`
	MinIdleConns int           `yaml:"min_idle_conns"`
	PollPeriod   time.Duration `yaml:"poll_period"`
}

Jump to

Keyboard shortcuts

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