Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerFunc ¶
func (HandlerFunc) HandlerMessage ¶
func (h HandlerFunc) HandlerMessage(message *Message) error
HandleMessage implements the Handler interface
type Msg ¶
type Msg interface { NewProducer() Msg // new producer NewConsumer(topic, channel string) Msg // new consumer Stop() // consumer Stop Pub(topic string, msg interface{}) error // pub interface{} message MultiPub(topic string, msgs ...interface{}) error // MultiPub ...interface{} message Sub(handler HandlerFunc) error // sub func to handle your work }
message platform
func NewConsumer ¶
new consumer
type Nsg ¶
type Nsg struct {
// contains filtered or unexported fields
}
nsq
func (*Nsg) NewConsumer ¶
func (*Nsg) NewProducer ¶
func (*Nsg) Sub ¶
func (n *Nsg) Sub(handler HandlerFunc) error
Click to show internal directories.
Click to hide internal directories.