# Packages
Package handlertrace allows middleware authors using lambda.NewHandler to instrument request and response events.
# Functions
NewFunction which creates a Function with a given Handler
Deprecated: The Function type is public for the go1.x runtime internal use of the net/rpc package.
NewHandler creates a base lambda handler from the given handler function.
NewHandlerWithOptions creates a base lambda handler from the given handler function.
Start takes a handler and talks to an internal Lambda endpoint to pass requests to the handler.
StartHandler takes in a Handler wrapper interface which can be implemented either by a custom function or a struct.
StartHandlerFunc is the same as StartWithOptions except that it takes a generic input so that the function signature can be validated at compile time.
StartHandlerWithContext is the same as StartHandler except sets the base context for the function.
StartWithContext is the same as Start except sets the base context for the function.
StartWithOptions is the same as Start after the application of any handler options specified.
WithContext is a HandlerOption that sets the base context for all invocations of the handler.
WithContextValue adds a value to the handler context.
WithUseNumber sets the DisallowUnknownFields option on the underlying json decoder
Usage:
lambda.StartWithOptions( func (event any) (any, error) { return event, nil }, lambda.WithDisallowUnknownFields(true) ).
WithEnableSIGTERM enables SIGTERM behavior within the Lambda platform on container spindown.
WithSetEscapeHTML sets the SetEscapeHTML argument on the underlying json encoder
Usage:
lambda.StartWithOptions( func () (string, error) { return "<html><body>hello!></body></html>", nil }, lambda.WithSetEscapeHTML(true), ).
WithSetIndent sets the SetIndent argument on the underling json encoder
Usage:
lambda.StartWithOptions( func (event any) (any, error) { return event, nil }, lambda.WithSetIndent(">"," "), ).
WithUseNumber sets the UseNumber option on the underlying json decoder
Usage:
lambda.StartWithOptions( func (event any) (any, error) { return event, nil }, lambda.WithUseNumber(true) ).
# Structs
Function struct which wrap the Handler
Deprecated: The Function type is public for the go1.x runtime internal use of the net/rpc package.
# Interfaces
HandlerFunc represents a valid input with two arguments and two returns as described by Start.