nsq

package
v1.124.14 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsumer

func NewConsumer(h Consumer, m Marshaller) nsq.Handler

NewConsumer handler for NSQ.

Types

type Consumer

type Consumer interface {
	Consume(ctx context.Context, message *Message) error
}

Consumer for NSQ.

type Headers

type Headers map[string]string

Headers of message.

type Marshaller

type Marshaller marshaller.Marshaller

Marshaller for NSQ.

func NewMsgPackMarshaller

func NewMsgPackMarshaller() Marshaller

NewMsgPackMarshaller for NSQ.

type Message

type Message struct {
	Headers Headers `msgpack:"headers"`
	Body    []byte  `msgpack:"body"`

	*nsq.Message `msgpack:"-"`
}

Message for NSQ.

func NewMessage

func NewMessage(body []byte) *Message

New message.

type Producer

type Producer interface {
	Produce(ctx context.Context, topic string, message *Message) error
}

Producer for NSQ.

Jump to

Keyboard shortcuts

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