requestid

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultHeader = header.XRequestID

DefaultHeader is the default request, response header

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestID

type RequestID struct {
	// TrustProxy trusts request id from request header
	// sets TrustProxy to false for always generate new request id
	TrustProxy bool

	// Header is the http header key
	Header string
}

RequestID middleware

func New

func New() *RequestID

New creates default req id middleware

func (RequestID) ServeHandler

func (m RequestID) ServeHandler(h http.Handler) http.Handler

ServeHandler implements middleware interface

Jump to

Keyboard shortcuts

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