sqs

package module
v0.0.0-...-2932921 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 8 Imported by: 50

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeHandler

func InitializeHandler(h Handler) worker.Handler

InitializeHandler returns go-sqs-poller worker Handler from common Handler interface.

Types

type Handler

type Handler interface {
	HandleMessage(ctx context.Context, msg *types.Message) error
}

Handler is common interface for handling sqs message in the risken.

func RetryableErrorHandler

func RetryableErrorHandler(h Handler) Handler

RetryableErrorHandler returns the Handler that returns nil when NonRetryableError occurred.

func StatusLoggingHandler

func StatusLoggingHandler(logger logging.Logger, h Handler) Handler

func TracingHandler

func TracingHandler(serviceName string, h Handler) Handler

type HandlerFunc

type HandlerFunc func(ctx context.Context, msg *types.Message) error

func (HandlerFunc) HandleMessage

func (f HandlerFunc) HandleMessage(ctx context.Context, msg *types.Message) error

type NonRetryableError

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

NonRetryableError indicates an error that the message cause the error cannot be retried.

func WrapNonRetryable

func WrapNonRetryable(err error) NonRetryableError

func (NonRetryableError) Error

func (e NonRetryableError) Error() string

Jump to

Keyboard shortcuts

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