handlertrace

package
Version: v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: Apache-2.0 Imports: 1 Imported by: 26

Documentation

Overview

Package handlertrace allows middleware authors using lambda.NewHandler to instrument request and response events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, trace HandlerTrace) context.Context

NewContext adds callbacks to the provided context which allows handlers which wrap the return value of lambda.NewHandler to access to the request and response events.

Types

type HandlerTrace

type HandlerTrace struct {
	RequestEvent  func(context.Context, interface{})
	ResponseEvent func(context.Context, interface{})
}

HandlerTrace allows handlers which wrap the return value of lambda.NewHandler to access to the request and response events.

func FromContext

func FromContext(ctx context.Context) HandlerTrace

FromContext returns the HandlerTrace associated with the provided context.

Source Files

Jump to

Keyboard shortcuts

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