lambda

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateArmGoDockerLambda

func CreateArmGoDockerLambda(
	stack constructs.Construct,
	name *string,
	codePath *string,
	dockerImageFunctionProps *awslambda.DockerImageFunctionProps) *awslambda.DockerImageFunction

Creates a Lambda function using Go that will run on ARM64 architecture. Other parameters can be supplied via dockerImageFunctionProps. Test Change.

func IsInLambda

func IsInLambda() bool

Returns true if the function is running in a lambda environment.

func RunHandler

func RunHandler(
	handler func(
		context.Context,
		interface{}) (interface{}, error),
	event interface{}) error

RunHandler runs the handler function in an AWS Lambda environment if it detects one and defaults to the local environment if not. The event is ignored if the function is running in a lambda environment.

func SwitchingHttpHandler

func SwitchingHttpHandler(addr string, handler http.Handler) error

A function that runs an http handler in a lambda environment or a local server depending on whether the function is running in a lambda environment or not. The addr argument is ignored if the function is running in a lambda environment.

func SwitchingRouter

func SwitchingRouter(addr string, router *chi.Mux) error

A function that runs a router in a lambda environment or a local server depending on whether the function is running in a lambda environment or not. The addr argument is ignored if the function is running in a lambda environment.

Types

This section is empty.

Jump to

Keyboard shortcuts

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