nsq

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPublisher

func NewPublisher(addr string) (pubsub.Publisher,
	error)

NewPublisher will initiate a new nsq producer.

func NewSubscriber

func NewSubscriber(topic, channel string, nsqlookupds []string, concurrency int,
	h gonsq.Handler) (pubsub.Subscriber, error)

NewSubscriber will initiate an nsq consumer.

Types

type NoopNSQLogger

type NoopNSQLogger struct{}

NoopNSQLogger allows us to pipe NSQ logs to dev/null. The default NSQ logger is great for debugging, but did not fit our normally well structured JSON logs. Luckily NSQ provides a simple interface for injecting your own logger.

func (*NoopNSQLogger) Output

func (l *NoopNSQLogger) Output(calldepth int, s string) error

Output allows us to implement the nsq.Logger interface.

Jump to

Keyboard shortcuts

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