nsq

package
v0.0.0-...-bcc66f6 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package nsq provides NSQ implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

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

Publisher publish message.

func NewPublisher

func NewPublisher(addr string) (*Publisher, error)

NewPublisher constructs new Publisher.

func (*Publisher) Publish

func (p *Publisher) Publish(topic string, body []byte) error

Publish message.

func (*Publisher) Stop

func (p *Publisher) Stop() error

Stop the publisher.

type Receiver

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

Receiver receive message.

func NewReceiver

func NewReceiver(topic, channel, lookupdAddr string, cfg *nsq.Config) (*Receiver, error)

NewReceiver constructs new Receiver.

func (*Receiver) Listen

func (r *Receiver) Listen(h mq.Handler) error

Listen to incoming message. This will block until error found or the listening stoppped.

func (*Receiver) Stop

func (r *Receiver) Stop() error

Stop the receiver.

Jump to

Keyboard shortcuts

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