handler

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSourceEvent

func GetSourceEvent(ctx context.Context) any

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