nsq

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageHandler

type MessageHandler struct {
	Channel string
	// contains filtered or unexported fields
}

MessageHandler MessageHandler

func NewMessageHandler

func NewMessageHandler(nsqServer string, channel string) (mh *MessageHandler, err error)

NewMessageHandler return new MessageHandler

func (*MessageHandler) Registry

func (m *MessageHandler) Registry(topic string, ch chan []byte)

Registry registry nsq topic

type Producer

type Producer struct {
	P *gnsq.Producer
}

Producer Producer

func NewProducer

func NewProducer(addr string) (producer *Producer, err error)

NewProducer init

return producer

func (*Producer) Publish

func (m *Producer) Publish(topic string, data []byte) (err error)

Publish publish topic

return error

Jump to

Keyboard shortcuts

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