nsq

package
v0.0.0-...-eb64f0e Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTopicRequired   = errors.New("topic is empty")
	ErrHandlerRequired = errors.New("handler is empty")
	ErrChannelRequired = errors.New("channel is empty")
)

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	*nsq.Consumer
}

func (*Consumer) Stop

func (c *Consumer) Stop()

type Mq

type Mq struct {
	Conf *nsq.Config
}

func (*Mq) CreateConsumer

func (m *Mq) CreateConsumer(topic, channel, addr string, handler nsq.Handler) (*Consumer, error)

func (*Mq) CreateProducer

func (m *Mq) CreateProducer(addr string) (*Producer, error)

func (*Mq) NewConf

func (mq *Mq) NewConf(setConf ...func(*nsq.Config)) *nsq.Config

type Producer

type Producer struct {
	*nsq.Producer
}

func (*Producer) Pub

func (p *Producer) Pub(topic string, message interface{}) error

func (*Producer) StopIt

func (p *Producer) StopIt()

Jump to

Keyboard shortcuts

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