Documentation ¶
Index ¶
- func CollectMetrics(metric string, spy Spy, ...) fasthttp.RequestHandler
- func CollectSimpleMetrics(metric string, next fasthttp.RequestHandler) fasthttp.RequestHandler
- func HTTPRequestID(handler fasthttp.RequestHandler) fasthttp.RequestHandler
- func Logger(basicLogger *zap.Logger, handler fasthttp.RequestHandler) fasthttp.RequestHandler
- func RequestID(handler fasthttp.RequestHandler) fasthttp.RequestHandler
- type Spy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectMetrics ¶
func CollectMetrics(metric string, spy Spy, next func(p personification.Person, ctx *fasthttp.RequestCtx)) fasthttp.RequestHandler
CollectMetrics and send to metrics
func CollectSimpleMetrics ¶
func CollectSimpleMetrics(metric string, next fasthttp.RequestHandler) fasthttp.RequestHandler
CollectSimpleMetrics and send to metrics
func HTTPRequestID ¶
func HTTPRequestID(handler fasthttp.RequestHandler) fasthttp.RequestHandler
HTTPRequestID collects the request ID from X-Request-Id header or Cloudflare analog Cf-Ray
func Logger ¶
func Logger(basicLogger *zap.Logger, handler fasthttp.RequestHandler) fasthttp.RequestHandler
Logger wraps http request context with the logger object
func RequestID ¶
func RequestID(handler fasthttp.RequestHandler) fasthttp.RequestHandler
RequestID passing internal request ID
Types ¶
type Spy ¶
type Spy func(next func(p personification.Person, ctx *fasthttp.RequestCtx)) fasthttp.RequestHandler
Spy function wrapper
Click to show internal directories.
Click to hide internal directories.