README

go-sqs-worker

Expand ▾ Collapse ▴

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	ErrorHandler ErrorHandlerFunc
	// contains filtered or unexported fields
}

func NewConsumer

func NewConsumer() *Consumer

func NewConsumerWithClient

func NewConsumerWithClient(client sqsiface.SQSAPI) *Consumer

func (*Consumer) Handle

func (c *Consumer) Handle(queueURL string, handle HandlerFunc)

func (*Consumer) Run

func (c *Consumer) Run()

func (*Consumer) Shutdown

func (c *Consumer) Shutdown(ctx context.Context) error

func (*Consumer) Use

func (c *Consumer) Use(middleware ...MiddlewareFunc)

type Context

type Context interface {
	Context() context.Context
	WithContext(ctx context.Context) Context
	Message() *sqs.Message
	MessageBody() string
	Error(err error)
}

type ErrorHandlerFunc

type ErrorHandlerFunc func(c Context, err error)

type HandlerFunc

type HandlerFunc func(c Context) error

type MiddlewareFunc

type MiddlewareFunc func(next HandlerFunc) HandlerFunc

Directories

Path Synopsis
internal
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.