lambdaurl

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

lambdaurl-buffered

lambdaurl converts an http.Handler into a Lambda request handler. It supports Lambda Function URLs configured with buffered response mode.

Lambda functions with

e := echo.New()
e.GET("/hc", HealthCheck)

// lambda from github.com/aws/aws-lambda-go/lambda
lambda.Start(lambdaurl.Wrap(e))

License

This project is a redistribution with modifications of code from: https://github.com/aws/aws-lambda-go/blob/main/lambdaurl/http_handler.go

Documentation

Overview

lambdaurl converts an http.Handler into a Lambda request handler. Supports Lambda Function URLs configured with buffered response mode. Based on https://github.com/aws/aws-lambda-go/tree/main/lambdaurl

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestFromContext

func RequestFromContext(ctx context.Context) (*events.LambdaFunctionURLRequest, bool)

RequestFromContext returns the *events.LambdaFunctionURLRequest from a context.

func Start

func Start(handler http.Handler, options ...lambda.Option)

func Wrap

Wrap converts an http.Handler into a Lambda request handler.

Types

type RequestConvertionError

type RequestConvertionError struct {
	Cause error
}

RequestConvertionError is returned when the conversion of the Lambda request to an http.Request fails.

func (RequestConvertionError) Error

func (e RequestConvertionError) Error() string

func (RequestConvertionError) Unwrap

func (e RequestConvertionError) Unwrap() error

type WriteResponseError

type WriteResponseError struct {
	Cause error
}

WriteResponseError is returned when writing the response fails.

func (WriteResponseError) Error

func (e WriteResponseError) Error() string

func (WriteResponseError) Unwrap

func (e WriteResponseError) Unwrap() error

Jump to

Keyboard shortcuts

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