sqat

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: MIT Imports: 8 Imported by: 0

README

sqat

sqat is a message router Lambda function like "at" command for Amazon SQS.

LICENSE

MIT

Documentation

Index

Constants

View Source
const (
	// AtTimestamp is a message attribute key represents an invocation timestamp.
	AtTimestamp = "AtTimestamp"

	// OriginalMessageID is a message attribute key represents an original message ID.
	OriginalMessageID = "OriginalMessageID"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Attributes    map[string]string
	Body          string
	MessageId     string
	ReceiptHandle string
}

type Option

type Option struct {
	IncomingQueueURL string
	OutgoingQueueURL string
}

Option represents option values of router

type Router

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

Router represents sqat application

func New

func New(opt *Option) (*Router, error)

New creates a new router

func (*Router) HandleMessage

func (r *Router) HandleMessage(ctx context.Context, msg *sqs.Message) error

HandleMessage routes a message.

func (*Router) Poll

func (r *Router) Poll(ctx context.Context) error

Poll polls incoming queue and do route.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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