Documentation ¶
Index ¶
- func AttachRoutes(handlers *Handlers) http.Handler
- func HTTPGenerateXRequestID() kithttp.RequestFunc
- func HTTPRequestEndpoint(endpoint string) kithttp.RequestFunc
- func HTTPRequestLogger(logger kitlog.Logger, exclude string) kithttp.RequestFunc
- func HTTPReturnXRequestID() kithttp.ServerResponseFunc
- type CustomCtxKey
- type Handlers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachRoutes ¶
AttachRoutes wire handlers with routes
func HTTPGenerateXRequestID ¶
func HTTPGenerateXRequestID() kithttp.RequestFunc
HTTPGenerateXRequestID gets or create a request id token.
func HTTPRequestEndpoint ¶
func HTTPRequestEndpoint(endpoint string) kithttp.RequestFunc
HTTPRequestEndpoint includes a new request ctx entry indicating which endpoint was requested.
func HTTPRequestLogger ¶
func HTTPRequestLogger(logger kitlog.Logger, exclude string) kithttp.RequestFunc
func HTTPReturnXRequestID ¶
func HTTPReturnXRequestID() kithttp.ServerResponseFunc
Types ¶
type CustomCtxKey ¶
type CustomCtxKey int
CustomCtxKey represents a custom key type for API requests context.
const ( // ContextKeyEndpoint is the context key // for the requested API endpoint. ContextKeyEndpoint CustomCtxKey = iota )
Click to show internal directories.
Click to hide internal directories.