nsq

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Topic   string
	Content []byte
}

Message nsq message publish object

type Publisher

type Publisher interface {
	Init(*PublisherEnv) error // init function
	Publish(*Message) error   // publish function
}

Publisher producer publish interface

func NewPublish

func NewPublish() Publisher

NewPublish publisher new function

type PublisherEnv

type PublisherEnv struct {
	Address string
	Config  *nsq.Config
}

PublisherEnv nsq publisher init params

type Receiver

type Receiver interface {
	Init(*ReceiverEnv) error // init function
}

Receiver receiver publish interface

func NewReceive

func NewReceive() Receiver

NewReceive receiver new function

type ReceiverEnv

type ReceiverEnv struct {
	Address string
	Config  *nsq.Config
	Topic   string
	Channel string
	Handler *nsq.Handler
}

ReceiverEnv nsq receiver init params

Jump to

Keyboard shortcuts

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