worker

package
v1.76.3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package worker provides a worker that processes S3 event notifications.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Worker

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

Worker processes S3 event notifications. It is responsible for processing messages from the SQS queue and sending them to the next consumer. It also handles deleting messages from the SQS queue after they have been processed. It is designed to be used in a worker pool.

func New

func New(tel component.TelemetrySettings, cfg aws.Config, unmarshaler event.Unmarshaler, directory string) *Worker

New creates a new Worker

func (*Worker) ProcessMessage

func (w *Worker) ProcessMessage(ctx context.Context, msg types.Message, queueURL string, deferThis func())

ProcessMessage processes a message from the SQS queue TODO add metric for number of messages processed / deleted / errors, events processed, etc.

Jump to

Keyboard shortcuts

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