Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(log restql.Logger, h fasthttp.RequestHandler, mws []Middleware) fasthttp.RequestHandler
Apply takes a base handler and a slice of middlewares, applying each one in the order they are given.
func GetNativeContext ¶
func GetNativeContext(ctx *fasthttp.RequestCtx) context.Context
GetNativeContext retrieve a standard library context from FastHTTP request context.
func WithNativeContext ¶
func WithNativeContext(ctx *fasthttp.RequestCtx, nativeCtx context.Context)
WithNativeContext stores a standard library context into FastHTTP request context.
Types ¶
type Middleware ¶
type Middleware interface {
Apply(h fasthttp.RequestHandler) fasthttp.RequestHandler
}
Middleware defines a generic handler wrapper capable of controlling request flow.
func FetchEnabled ¶
FetchEnabled returns all middlewares enabled in configuration
Click to show internal directories.
Click to hide internal directories.