aws-lambda-go: github.com/aws/aws-lambda-go/lambda/handlertrace Index | Files

package handlertrace

import "github.com/aws/aws-lambda-go/lambda/handlertrace"

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

Index

Package Files

trace.go

func NewContext Uses

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.

type HandlerTrace Uses

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 Uses

func FromContext(ctx context.Context) HandlerTrace

FromContext returns the HandlerTrace associated with the provided context.

Package handlertrace imports 1 packages (graph) and is imported by 4 packages. Updated 2019-01-29. Refresh now. Tools for package owners.