nsq

package
v1.76.7 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Unlicense Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProducer

func NewProducer(params ProducerParams, opts ...ProducerOption) producer.Producer

NewProducer for NSQ.

func RegisterConsumer

func RegisterConsumer(params ConsumerParams, opts ...ConsumerOption) error

RegisterConsumer for NSQ.

Types

type Config

type Config struct {
	LookupHost string       `yaml:"lookup_host"`
	Host       string       `yaml:"host"`
	Retry      retry.Config `yaml:"retry"`
	UserAgent  string       `yaml:"user_agent"`
}

type ConsumerOption added in v1.59.0

type ConsumerOption interface {
	// contains filtered or unexported methods
}

ConsumerOption for NSQ.

func WithConsumerLogger added in v1.59.0

func WithConsumerLogger(logger *zap.Logger) ConsumerOption

WithConsumerLogger for NSQ.

func WithConsumerMetrics added in v1.65.0

func WithConsumerMetrics(metrics *prometheus.ConsumerMetrics) ConsumerOption

WithConsumerMetrics for NSQ.

func WithConsumerTracer added in v1.59.0

func WithConsumerTracer(tracer opentracing.Tracer) ConsumerOption

WithConsumerConfig for NSQ.

type ConsumerParams

type ConsumerParams struct {
	Lifecycle fx.Lifecycle

	Topic, Channel string
	Config         *Config
	Handler        handler.Handler
	Marshaller     marshaller.Marshaller
}

ConsumerParams for NSQ.

type ProducerOption added in v1.59.0

type ProducerOption interface {
	// contains filtered or unexported methods
}

ProducerOption for NSQ.

func WithProducerBreaker added in v1.59.0

func WithProducerBreaker() ProducerOption

WithProducerBreaker for NSQ.

func WithProducerLogger added in v1.59.0

func WithProducerLogger(logger *zap.Logger) ProducerOption

WithProducerLogger for NSQ.

func WithProducerMetrics added in v1.65.0

func WithProducerMetrics(metrics *prometheus.ProducerMetrics) ProducerOption

WithProducerMetrics for NSQ.

func WithProducerRetry added in v1.59.0

func WithProducerRetry() ProducerOption

WithProducerRetry for NSQ.

func WithProducerTracer added in v1.59.0

func WithProducerTracer(tracer opentracing.Tracer) ProducerOption

WithProducerConfig for NSQ.

type ProducerParams

type ProducerParams struct {
	Lifecycle fx.Lifecycle

	Config     *Config
	Marshaller marshaller.Marshaller
}

ProducerParams for NSQ.

Directories

Path Synopsis
zap
metrics
trace

Jump to

Keyboard shortcuts

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