Versions in this module Expand all Collapse all v0 v0.1.0 Sep 12, 2024 Changes in this version + func GetRoutingKey(routingKey string, headers amqp.Table, queueName string) (string, error) + func HaltErrorf(format string, a ...any) error + func NewDeadletterError() error + type Action int + const Ack + const ManualAck + const NackDiscard + const NackRequeue + func (a Action) String() string + type Consumer struct + func NewConsumer(logger *slog.Logger, uri string, opts ConsumerOptions, handler HandlerFunc) *Consumer + func (c *Consumer) Run(ctx context.Context) error + type ConsumerOptions struct + ChannelRetryWait time.Duration + ConnectRetryWait time.Duration + ConnectionName string + DeliveryLimit int64 + ExchangeName string + Exclusive bool + HaltFunction HaltFunc + OnError ErrorFunc + QueueName string + RetryHandlingWait time.Duration + RetryWait time.Duration + RoutingKeys []string + type DeadletterError struct + func (he *DeadletterError) Error() string + type ErrorFunc func(code TransitionCode, count int, err error) + type HaltError struct + func (he *HaltError) Error() string + func (he *HaltError) Unwrap() error + type HaltFunc func(code TransitionCode, count int, err error) bool + func HaltOnNthFailure(code TransitionCode, n int) HaltFunc + type HandlerFunc func(ctx context.Context, delivery amqp.Delivery) error + func AckHandler(fn func(ctx context.Context, delivery amqp.Delivery) (Action, error)) HandlerFunc + type TransitionCode string + const CodeCancelled + const CodeChanClosed + const CodeConnect + const CodeConsume + const CodeDeclare + const CodeDisconnected + const CodeHandlerFail + const CodeOpenChan v0.0.1 Sep 4, 2024