cllambda

package
v0.24.4 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package cllambda providees reusable fx code for building AWS Lambda infra

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Invoke

func Invoke[I, O any]() fx.Option

Invoke provides the fx Invoke option to start the lambda right after the 'start' lifecycle event. It does not actually start the lambda unless the AWS_LAMBDA_RUNTIME_API is present. Which will be present on a real deployment but not during testing.

func InvokeHandler added in v0.14.1

func InvokeHandler() fx.Option

InvokeHandler provides the fx.Invoke option to start the lambda right after the 'start' lifecycle event. As opposed to Invoke it requires a single lambda.Handler dependency to be provided by the application.

func Lambda

func Lambda[I, O any](o ...fx.Option) fx.Option

Lambda provides shared fx options (mostly modules) that may be used in any lambda handler so we can initialize them all in the same way (and even generate the main.go for all lambdas).

Types

type Handler

type Handler[I, O any] interface {
	Handle(ctx context.Context, input I) (O, error)
}

Handler is a generic lambda handler interface.

Jump to

Keyboard shortcuts

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