requestid

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderXRequestID = "X-Request-Id"
)

Variables

This section is empty.

Functions

func Middleware

func Middleware(opts ...Option) func(next http.Handler) http.Handler

Types

type Option

type Option func(*option)

func WithGenerateRequestID

func WithGenerateRequestID(fn func() string) Option

type RequestID

type RequestID struct {
	Generate func() string
}

func New

func New(opts ...Option) *RequestID

func (*RequestID) Middleware

func (re *RequestID) Middleware(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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