nsq

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProducer

func NewProducer(lc fx.Lifecycle, params *ProducerParams) (producer.Producer, error)

NewProducer for NSQ.

func RegisterConsumer

func RegisterConsumer(lc fx.Lifecycle, params *ConsumerParams) error

RegisterConsumer for NSQ.

Types

type Config added in v1.19.0

type Config struct {
	LookupHost string `envconfig:"NSQ_LOOKUP_HOST" required:"true" default:"localhost:4161"`
	Host       string `envconfig:"NSQ_HOST" required:"true" default:"localhost:4150"`

	Config *nsq.Config
}

func NewConfig

func NewConfig() (*Config, error)

NewConfig for NSQ.

type ConsumerParams

type ConsumerParams struct {
	Config  *Config
	Logger  *zap.Logger
	Topic   string
	Channel string
	Handler handler.Handler
}

ConsumerParams for NSQ.

type ProducerParams

type ProducerParams struct {
	Config *Config
	Logger *zap.Logger
}

ProducerParams for NSQ.

Directories

Path Synopsis
logger
zap
trace

Jump to

Keyboard shortcuts

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