lambda

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package lambda implements the AWS Lambda REST+JSON control-plane protocol as a server.Handler. Point a real aws-sdk-go-v2 Lambda client at a Server registered with this handler and operations work against an in-memory serverless driver.

MVP coverage: CreateFunction, GetFunction, ListFunctions, DeleteFunction, Invoke (synchronous). Versions, aliases, layers, concurrency configs, and event source mappings are not yet wired through — the driver supports them but the wire surface is deferred to a follow-up.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler serves AWS Lambda REST requests against a serverless.Serverless driver.

func New

func New(fn sdrv.Serverless) *Handler

New returns a Lambda handler backed by fn.

func (*Handler) Matches

func (*Handler) Matches(r *http.Request) bool

Matches returns true for any URL under /2015-03-31/functions — that's the Lambda control-plane prefix the SDK uses for every operation in our MVP.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP dispatches Lambda operations based on path shape and method.

/2015-03-31/functions                       GET=list, POST=create
/2015-03-31/functions/{name}                GET=get, DELETE=delete
/2015-03-31/functions/{name}/invocations    POST=invoke

Jump to

Keyboard shortcuts

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