Documentation ¶
Index ¶
- func BuildAndStart[T interface{}, U interface{}](getHandler func(awsConfig aws.Config) Handler[T, U])
- func BuildAndStartCustomResource(getHandler func(awsConfig aws.Config) cfn.CustomResourceFunction)
- func ContextWithLogger(ctx context.Context) context.Context
- func GetLogger(ctx context.Context) *slog.Logger
- func GetNewContextWithLogger(parent context.Context, logger *slog.Logger) context.Context
- func MustGetEnv(key string) string
- func MustGetEnvInt(key string) int
- func SQSAllFail(event events.SQSEvent) events.SQSEventResponse
- type Handler
- type SQSHandler
- type SQSRecordProcessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildAndStart ¶
func BuildAndStart[T interface{}, U interface{}](getHandler func(awsConfig aws.Config) Handler[T, U])
BuildAndStart configures a logger, instruments the handler with OpenTelemetry, instruments the AWS SDK, and then starts the lambda
func BuildAndStartCustomResource ¶
func BuildAndStartCustomResource(getHandler func(awsConfig aws.Config) cfn.CustomResourceFunction)
func GetNewContextWithLogger ¶
func MustGetEnv ¶
func MustGetEnvInt ¶
func SQSAllFail ¶
func SQSAllFail(event events.SQSEvent) events.SQSEventResponse
Types ¶
type Handler ¶
func GetSQSHandler ¶
func GetSQSHandler(processRecord SQSRecordProcessor) Handler[events.SQSEvent, events.SQSEventResponse]
GetSQSHandler returns a lambda handler that will process each SQS message in parallel using the provided processRecord function
func WithLogger ¶
type SQSHandler ¶
type SQSHandler = Handler[events.SQSEvent, events.SQSEventResponse]
type SQSRecordProcessor ¶
type SQSRecordProcessor func(ctx context.Context, record events.SQSMessage) error
Click to show internal directories.
Click to hide internal directories.