nsq

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsumer

func NewConsumer(conf Config, topic, channel string, handler vnsq.Handler) (*vnsq.Consumer, error)

func NewProducer

func NewProducer(conf Config) (*vnsq.Producer, error)

Types

type Config

type Config struct {
	Producer ConfigProducer `mapstructure:"producer"`
	Consumer ConfigConsumer `mapstructure:"consumer"`
	LogLevel string         `mapstructure:"log_level"`
}

type ConfigConsumer

type ConfigConsumer struct {
	Host                string        `mapstructure:"host"`
	Port                int           `mapstructure:"port"`
	MaxAttempts         uint16        `mapstructure:"max_attempts"`
	MaxInFlight         int           `mapstructure:"max_in_flight"`
	MaxRequeueDelay     time.Duration `mapstructure:"max_requeue_delay"`
	DefaultRequeueDelay time.Duration `mapstructure:"default_requeue_delay"`
}

type ConfigProducer

type ConfigProducer struct {
	Host string `mapstructure:"host"`
	Port int    `mapstructure:"port"`
}

Jump to

Keyboard shortcuts

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