sqsnotify2

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2019 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Succeed means "remove a message after notification succeeded"
	Succeed RemovePolicy = 0
	// IgnoreFailure means "remove a message after notification always"
	IgnoreFailure = 1
	// BeforeExecution means "remove a message before notification"
	BeforeExecution = 2
)
View Source
const Version = "v2.1.0"

Version is a string for sqs-notify2's version

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Profile    string
	Region     string
	QueueName  string
	MaxRetries int
	WaitTime   *int64

	CacheName string

	Workers      int
	Timeout      time.Duration
	RemovePolicy RemovePolicy
	CmdName      string
	CmdArgs      []string

	Logger *log.Logger
}

Config configures sqsnotify2 service

func NewConfig

func NewConfig() *Config

NewConfig creates a new Config object.

type RemovePolicy

type RemovePolicy int

RemovePolicy is a policy to remove SQS message.

type SQSNotify

type SQSNotify struct {
	Config
	// contains filtered or unexported fields
}

SQSNotify provides SQS consumer and job manager.

func New

func New(ctx context.Context, cfg *Config) *SQSNotify

New creates a SQSNotify object with configuration.

func (*SQSNotify) Run

func (sn *SQSNotify) Run() error

Run runs SQS notification service. ctx is not supported yet.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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