nsq

package
v1.124.5 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Unlicense Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProducer

func NewProducer(lc fx.Lifecycle, host string, m gn.Marshaller, opts ...ProducerOption) (gn.Producer, error)

NewProducer for NSQ.

func RegisterConsumer

func RegisterConsumer(lc fx.Lifecycle, host, topic, channel string, con gn.Consumer, mar gn.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(cfg *retry.Config) ProducerOption

WithProducerRetry for NSQ.

func WithProducerTracer added in v1.59.0

func WithProducerTracer(tracer ntracer.Tracer) ProducerOption

WithProducerConfig for NSQ.

func WithProducerUserAgent added in v1.121.0

func WithProducerUserAgent(userAgent string) ProducerOption

WithUserAgent for NSQ.

Directories

Path Synopsis
telemetry

Jump to

Keyboard shortcuts

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