Documentation ¶
Index ¶
- func CreateArmGoDockerLambda(stack constructs.Construct, name *string, codePath *string, ...) *awslambda.DockerImageFunction
- func IsInLambda() bool
- func RunHandler(handler func(context.Context, interface{}) (interface{}, error), ...) error
- func SwitchingHttpHandler(addr string, handler http.Handler) error
- func SwitchingRouter(addr string, router *chi.Mux) error
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 ¶
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 ¶
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.