middlewares

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package middlewares contains a set of middlewares which might be reused by most people

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckOpLogRequest

func CheckOpLogRequest(handler fasthttp.RequestHandler) fasthttp.RequestHandler

CheckOpLogRequest sets the optional variable for including Operational Log in the context depending on the supplied header. This value can be helpful in debugging

func CheckShutdownRequested

func CheckShutdownRequested(handler fasthttp.RequestHandler) fasthttp.RequestHandler

CheckShutdownRequested checks if the web server has been requested to be shut down. If it is supposed to be shut down, then a response is sent and request is not served Otherwise, the request is served as usual

func RequestLogger

func RequestLogger(handler fasthttp.RequestHandler) fasthttp.RequestHandler

RequestLogger is supposed to log the info about the hit received much the same way nginx logs its requests

func SetRandomVar

func SetRandomVar(handler fasthttp.RequestHandler) fasthttp.RequestHandler

func SetRequestId

func SetRequestId(handler fasthttp.RequestHandler) fasthttp.RequestHandler

Types

This section is empty.

Jump to

Keyboard shortcuts

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