middleware

package
v0.0.0-...-6775195 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: AGPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

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

RequestID passing internal request ID

Types

type Spy

type Spy func(next func(p personification.Person, ctx *fasthttp.RequestCtx)) fasthttp.RequestHandler

Spy function wrapper

func NewSpy

func NewSpy(ctx context.Context, whois whoisFn, sign signFn) Spy

NewSpy wrapper looking information about user and pass it in to

Jump to

Keyboard shortcuts

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