mq

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildConsumer

func BuildConsumer(consumers []Consumer)

func InitNsq

func InitNsq(rc *RootConfig)

func SendMsg

func SendMsg(topic, msg string) error

Types

type Consumer

type Consumer struct {
	Topic       string
	Channel     string
	Concurrency int
	Handler     func(msg string) error
}

type MsgHandler

type MsgHandler struct {
	Handler func(msg string) error
}

func (MsgHandler) HandleMessage

func (h MsgHandler) HandleMessage(message *nsq.Message) error

type RootConfig

type RootConfig struct {
	Config nsqConfig `yaml:"nsq"`
}

func NewConfig

func NewConfig() *RootConfig

Jump to

Keyboard shortcuts

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