lambda

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package lambda provides a lightweight AWS API Gateway v2 ↔ net/http adapter.

It is a minimal, dependency-free bridge over the AWS Lambda Go events. ServeHTTP converts an APIGatewayV2HTTPRequest into a standard *http.Request, dispatches it to any http.Handler (e.g., a chi router), and converts the captured response back to an APIGatewayV2HTTPResponse.

Usage:

lambda.Start(func(ctx context.Context, req events.APIGatewayV2HTTPRequest) (events.APIGatewayV2HTTPResponse, error) {
    return lambdahttp.ServeHTTP(ctx, req, router)
})

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeHTTP

ServeHTTP dispatches an APIGatewayV2HTTPRequest to handler and returns an APIGatewayV2HTTPResponse. This is the single integration point between API Gateway and a net/http handler. Errors are only returned for request conversion failures; handler panics should be caught by RecoverMiddleware.

Types

This section is empty.

Jump to

Keyboard shortcuts

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