gnsq

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NsqCli

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

NsqCli GMQ主要用于消息队列处理 目前主要自用的消息队列为Nsq

func NewNsqCli

func NewNsqCli(addr string, buffSize ...int) *NsqCli

func (*NsqCli) Consume

func (n *NsqCli) Consume(topic string, channel string, handlerName string, handler NsqMessageHandler)

func (*NsqCli) Publish

func (n *NsqCli) Publish(topic string, body []byte) error

func (*NsqCli) Stop

func (n *NsqCli) Stop()

type NsqMessageHandler

type NsqMessageHandler interface {
	HandleMessage(msg *nsq.Message) error
	GetName() string
}

Jump to

Keyboard shortcuts

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