handler

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSourceEvent

func GetSourceEvent(ctx context.Context) any

func NewALBHandler added in v0.8.0

func NewALBHandler(adapter AdapterFunc, multiValueHeaders bool) func(context.Context, events.ALBTargetGroupRequest) (events.ALBTargetGroupResponse, error)

func NewFunctionURLStreamingHandler added in v0.2.0

func NewHandler

func NewHandler[In any, Out any](handlerFunc HandlerFunc[In, Out], adapter AdapterFunc) func(context.Context, In) (Out, error)

func WrapWithRecover

func WrapWithRecover[In any, Out any](handler func(context.Context, In) (Out, error), recoverFunc RecoverFunc[In, Out]) func(context.Context, In) (Out, error)

Types

type AdapterFunc

type AdapterFunc func(ctx context.Context, r *http.Request, w http.ResponseWriter) error

type HandlerFunc added in v0.3.0

type HandlerFunc[In any, Out any] func(ctx context.Context, event In, adapter AdapterFunc) (Out, error)

type RecoverFunc

type RecoverFunc[In any, Out any] func(ctx context.Context, event In, panicValue any) (Out, error)

Jump to

Keyboard shortcuts

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