requestid

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultHeader = "X-Request-Id"

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 to false to 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