Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamoDBHandler ¶
type DynamoDBHandler interface { func(context.Context, events.DynamoDBEventRecord) error | func(context.Context, events.DynamoDBEventRecord) | func(events.DynamoDBEventRecord) error | func(events.DynamoDBEventRecord) }
DynamoDBHandler processes a single events.DynamoDBEventRecord
type DynamoDBProcessor ¶
type DynamoDBProcessor func(context.Context, events.DynamoDBEvent) (events.DynamoDBEventResponse, error)
DynamoDBProcessor can be passed directly to lamdba.Handle
func DynamoDB ¶
func DynamoDB[THandler DynamoDBHandler](handler THandler, opts ...Option) DynamoDBProcessor
DynamoDB processes each DynamoDBEventRecord in a DynamoDBEvent by invoking the provided DynamoDBHandler
type KinesisEventHandler ¶
type KinesisEventHandler interface { func(context.Context, events.KinesisEventRecord) error | func(context.Context, events.KinesisEventRecord) | func(events.KinesisEventRecord) error | func(events.KinesisEventRecord) }
KinesisEventHandler processes a single events.KinesisEventRecord
type KinesisProcessor ¶
type KinesisProcessor func(context.Context, events.KinesisEvent) (events.KinesisEventResponse, error)
DynamoDBProcessor can be passed directly to lamdba.Handle
func Kinesis ¶
func Kinesis[THandler KinesisEventHandler](handler THandler, opts ...Option) KinesisProcessor
Kinesis processes each DynamoDBEventRecord in a DynamoDBEvent by invoking the provided DynamoDBHandler
type Option ¶
type Option func(*options)
Option modifies the behavior of the event processing
func WithErrorCallback ¶
WithErrorCallback is invoked (if non-nil) when an error occurs processing an item Typically this is used to log the error for debugging/alerting
func WithRecovery ¶
WithRecovery captures any panics treating them as a returned error
type SQSHandler ¶
type SQSHandler interface { func(context.Context, events.SQSMessage) error | func(context.Context, events.SQSMessage) | func(events.SQSMessage) error | func(events.SQSMessage) }
SQSHandler processes a single events.SQSMessage
type SQSProcessor ¶
SQSProcessor can be passed directly to lamdba.Handle
func SQS ¶
func SQS[THandler SQSHandler](handler THandler, opts ...Option) SQSProcessor
SQS processes each SQSMessage in a SQSEvent by invoking the provided SQSHandler