lambda

package
v0.21.0-fork.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package lambda adapts AWS buffered HTTP events to Tegola's existing router.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func URLRoot

func URLRoot(r *http.Request) *url.URL

URLRoot returns a detached trusted public root for a Lambda request. Callers install this function once at assembly, never mutate it per invocation.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is immutable and supports concurrent buffered invocations.

func New

func New(handler http.Handler, options Options) (*Handler, error)

New wraps an already assembled HTTP handler without starting an AWS runtime.

func (*Handler) Invoke

func (h *Handler) Invoke(ctx context.Context, payload []byte) ([]byte, error)

Invoke preserves the invocation context through the ordinary HTTP router. Invalid transport data returns fixed value-free errors before handler I/O.

type Options

type Options struct {
	PublicURL           *url.URL
	UseProxyPath        bool
	MaxEventBytes       int
	MaxRequestBodyBytes int
	MaxResponseBytes    int
}

Options contains operator-controlled transport settings. PublicURL is the complete external origin and mapping path; inferred stages are not appended.

Jump to

Keyboard shortcuts

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