msg

package
v0.0.0-...-ec3c17e Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2017 License: LGPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

type Publisher struct {
	Data     chan []byte
	StopChan chan bool
	TermChan chan os.Signal
	// contains filtered or unexported fields
}

func NewPublisher

func NewPublisher(tpc string, addrs *[]string) (*Publisher, error)

func (*Publisher) Run

func (p *Publisher) Run(data chan []byte)

func (*Publisher) Stop

func (p *Publisher) Stop()

type Subscriber

type Subscriber struct {
	C *nsq.Consumer

	Data     chan []byte
	StopChan chan bool
	TermChan chan os.Signal
	// contains filtered or unexported fields
}

func NewSubscriber

func NewSubscriber(tpc, ch string, addrs *[]string) (*Subscriber, error)

func (*Subscriber) HandleMessage

func (s *Subscriber) HandleMessage(m *nsq.Message) error

func (*Subscriber) Stop

func (s *Subscriber) Stop()

Jump to

Keyboard shortcuts

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