queue

package
v0.0.0-...-81f2ad6 Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ID   string
	Name EventName
	Data []byte

	RetryCount int
	// contains filtered or unexported fields
}

type EventName

type EventName string

type Queue

type Queue interface {
	Pop(ctx context.Context, size int64) ([]*Event, error)

	Push(ctx context.Context, event *Event, delay int64) error
	Retry(ctx context.Context, event *Event, delay int64) error
	Remove(ctx context.Context, event *Event) error
}

func NewSQSQueue

func NewSQSQueue(cfg *SQSConfig) Queue

type SQSConfig

type SQSConfig struct {
	QueueURL          string
	Client            *sqs.Client
	PollInterval      time.Duration
	VisibilityTimeout time.Duration
}

Jump to

Keyboard shortcuts

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