sqsworker

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

README

go-sqs-worker

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.

Jump to

Keyboard shortcuts

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