amqphandler

package
v4.34.9 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: MIT Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoDeathCount = errors.New("no death count")

ErrNoDeathCount occurs when no death count is found in message

Functions

func GetDeathCount

func GetDeathCount(message amqp.Delivery) (int64, error)

GetDeathCount of a message

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App of package

func New

func New(config Config, amqpClient *amqpclient.Client, handler func(amqp.Delivery) error) (App, error)

New creates new App from Config

func NewFromString

func NewFromString(amqpClient *amqpclient.Client, handler func(amqp.Delivery) error, exchange, queue, routingKey, retryInterval string, exclusive bool, maxRetry uint) (App, error)

NewFromString creates new App from string configuration

func (App) Done

func (a App) Done() <-chan struct{}

Done returns the chan used for synchronization

func (App) Retry

func (a App) Retry(log logger.Provider, message amqp.Delivery) error

Retry a message if possible on error

func (App) Start

func (a App) Start(done <-chan struct{})

Start amqp handler

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config of package

func Flags

func Flags(fs *flag.FlagSet, prefix string, overrides ...flags.Override) Config

Flags adds flags for configuring package

Jump to

Keyboard shortcuts

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