connections

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: BSD-3-Clause Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const AddrStep = ","

Variables

This section is empty.

Functions

This section is empty.

Types

type Mem

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

Mem, in-memory queue, only works on single machine

func NewMem

func NewMem() *Mem

func (*Mem) Consume

func (m *Mem) Consume(concurrency int, exit chan struct{}) error

func (*Mem) Dispatch

func (m *Mem) Dispatch(payload interface{}, delay ...time.Duration) error

func (*Mem) Stop

func (m *Mem) Stop() error

type Nsq

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

func NewNsq

func NewNsq(config map[string]interface{}) *Nsq

func NewNsqFromConfig added in v0.0.4

func NewNsqFromConfig(conf NsqConfig) *Nsq

func (*Nsq) Consume

func (n *Nsq) Consume(concurrency int, exit chan struct{}) (err error)

func (*Nsq) Dispatch

func (n *Nsq) Dispatch(payload interface{}, delay ...time.Duration) (err error)

func (*Nsq) SetHandler added in v0.0.4

func (n *Nsq) SetHandler(h nsq.Handler) *Nsq

func (*Nsq) Stop

func (n *Nsq) Stop() error

type NsqConfig added in v0.0.4

type NsqConfig struct {
	Lookupd, Nsqd, Topic, Channel string
	UsingLookup                   bool
	// contains filtered or unexported fields
}

type Redis added in v0.0.8

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

func NewRedis added in v0.0.8

func NewRedis(rdb redis.UniversalClient, queue string) *Redis

func (*Redis) Consume added in v0.0.8

func (r *Redis) Consume(concurrency int, exit chan struct{}) error

func (*Redis) Dispatch added in v0.0.8

func (r *Redis) Dispatch(payload interface{}, delay ...time.Duration) error

func (*Redis) Stop added in v0.0.8

func (r *Redis) Stop() error

Jump to

Keyboard shortcuts

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