retry

package
v0.0.0-...-489484a Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedToProduceRetryMessage = errors.New("failed to produce retry message")
	ErrFailedToAckMessage          = errors.New("failed to ack message")
)

Functions

This section is empty.

Types

type MessagePublisher

type MessagePublisher interface {
	ProduceRaw(ctx context.Context, key interface{}, msg *amqp.Publishing) error
	Close()
}

type NoOpMessagePublisher

type NoOpMessagePublisher struct{}

func (*NoOpMessagePublisher) Close

func (nop *NoOpMessagePublisher) Close()

func (*NoOpMessagePublisher) ProduceRaw

func (nop *NoOpMessagePublisher) ProduceRaw(ctx context.Context, key interface{}, msg *amqp.Publishing) error

type RetryPublisher

type RetryPublisher struct {
	MessagePublisher MessagePublisher
}

func NewRetryPublisherConfig

func NewRetryPublisherConfig(options ...RetryPublisherConfigOption) *RetryPublisher

func (*RetryPublisher) OnError

func (r *RetryPublisher) OnError(ctx context.Context, raw *amqp.Delivery) error

type RetryPublisherConfigOption

type RetryPublisherConfigOption func(*RetryPublisher)

func WithMessagePublisher

func WithMessagePublisher(publisher MessagePublisher) RetryPublisherConfigOption

Jump to

Keyboard shortcuts

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