lambda

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: GPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateArmGoDockerLambda added in v1.1.4

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.

func IsInLambda added in v1.0.2

func IsInLambda() bool

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

func RunHandler added in v1.0.3

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 added in v1.0.3

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 added in v1.0.3

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