nsq

package
v0.0.0-...-d37ed5e Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsumerStart

func ConsumerStart(addr string, topic string, channel string)

ConsumerStart nsq

func ConsumerStop

func ConsumerStop()

ConsumerStop nsq

func ProducerStart

func ProducerStart(addr string)

ProducerStart nsq

func ProducerStop

func ProducerStop()

ProducerStop nsq

func Publish

func Publish(topic string, message []byte)

Publish to nsq Producer

func RegisterConsumerHandler

func RegisterConsumerHandler(h ConsumerHandler)

RegisterConsumerHandler with the same name, the one registered last will take effect.

Types

type ConsumerHandler

type ConsumerHandler interface {
	ProcessMessage(topic string, channel string, message []byte) error
}

ConsumerHandler creates a service handler that will be used to handle message.

Jump to

Keyboard shortcuts

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