Documentation ¶
Index ¶
- func NewProducer(lc fx.Lifecycle, host string, m gn.Marshaller, opts ...ProducerOption) (gn.Producer, error)
- func RegisterConsumer(lc fx.Lifecycle, host, topic, channel string, con gn.Consumer, ...) error
- type Config
- type ConsumerOption
- type ProducerOption
- func WithProducerBreaker() ProducerOption
- func WithProducerLogger(logger *zap.Logger) ProducerOption
- func WithProducerMetrics(meter metric.Meter) ProducerOption
- func WithProducerRetry(cfg *r.Config) ProducerOption
- func WithProducerTracer(tracer ntracer.Tracer) ProducerOption
- func WithProducerUserAgent(userAgent string) ProducerOption
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 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 *r.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.
Click to show internal directories.
Click to hide internal directories.