...

Source file src/github.com/go-kit/kit/transport/awslambda/request_response_funcs.go

Documentation: github.com/go-kit/kit/transport/awslambda

     1  package awslambda
     2  
     3  import (
     4  	"context"
     5  )
     6  
     7  // HandlerRequestFunc may take information from the received
     8  // payload and use it to place items in the request scoped context.
     9  // HandlerRequestFuncs are executed prior to invoking the endpoint and
    10  // decoding of the payload.
    11  type HandlerRequestFunc func(ctx context.Context, payload []byte) context.Context
    12  
    13  // HandlerResponseFunc may take information from a request context
    14  // and use it to manipulate the response before it's marshaled.
    15  // HandlerResponseFunc are executed after invoking the endpoint
    16  // but prior to returning a response.
    17  type HandlerResponseFunc func(ctx context.Context, response interface{}) context.Context
    18  
    19  // HandlerFinalizerFunc is executed at the end of Invoke.
    20  // This can be used for logging purposes.
    21  type HandlerFinalizerFunc func(ctx context.Context, resp []byte, err error)
    22  

View as plain text