s3sqs

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

type Downloader interface {
	Load(ctx context.Context, uri string) ([]byte, error)
}

Downloader represents an object downloader

type Ingress

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

Ingress represents an ingress layer.

func New

func New(conf *config.S3SQS, region string, monitor monitor.Monitor) (*Ingress, error)

New creates a new ingestion with SQS/S3 files.

func NewWith

func NewWith(reader Reader, loader Downloader, monitor monitor.Monitor) *Ingress

NewWith creates a new ingestion with SQS/S3 files.

func (*Ingress) Close

func (s *Ingress) Close()

Close stops consuming

func (*Ingress) Range

func (s *Ingress) Range(f func(v []byte) bool)

Range iterates through the queue, stops only if Close() is called or the f callback returns true.

type Reader

type Reader interface {
	io.Closer
	StartPolling(maxPerRead, sleepMs int64, attributeNames, messageAttributeNames []*string) <-chan *awssqs.Message
	DeleteMessage(msg *awssqs.Message) error
}

Reader represents a consumer for SQS

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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