nsq

package
v1.103.3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Unlicense Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProducer

func NewProducer(lc fx.Lifecycle, cfg *Config, m marshaller.Marshaller, opts ...ProducerOption) (producer.Producer, error)

NewProducer for NSQ.

func RegisterConsumer

func RegisterConsumer(lc fx.Lifecycle, topic, channel string, cfg *Config, h handler.Handler, m marshaller.Marshaller, opts ...ConsumerOption) error

RegisterConsumer for NSQ.

Types

type Config

type Config struct {
	LookupHost string       `yaml:"lookup_host" json:"lookup_host" toml:"lookup_host"`
	Host       string       `yaml:"host" json:"host" toml:"host"`
	Retry      retry.Config `yaml:"retry" json:"retry" toml:"retry"`
	UserAgent  string       `yaml:"user_agent" json:"user_agent" toml:"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(meter metric.Meter) ConsumerOption

WithConsumerMetrics for NSQ.

func WithConsumerTracer added in v1.59.0

func WithConsumerTracer(tracer ntracer.Tracer) ConsumerOption

WithConsumerConfig 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(meter metric.Meter) 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 ntracer.Tracer) ProducerOption

WithProducerConfig for NSQ.

Directories

Path Synopsis
telemetry

Jump to

Keyboard shortcuts

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