Documentation ¶ Index ¶ Constants func Middleware(opts ...Option) func(next http.Handler) http.Handler type Option func WithGenerateRequestID(fn func() string) Option type RequestID func New(opts ...Option) *RequestID func (re *RequestID) Middleware(next http.Handler) http.Handler 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 Source Files ¶ View all Source files requestid.go Click to show internal directories. Click to hide internal directories.