Documentation
¶
Index ¶
Constants ¶
View Source
const ( RequestIDKey contextKey = "requestId" RequestIDHeader string = "X-Request-Id" )
Variables ¶
This section is empty.
Functions ¶
func LogRequests ¶ added in v0.3.0
LogRequests logs the incoming requests
Types ¶
type RequestIdConfig ¶
type RequestIdConfig struct {
AcceptFromHeader bool
}
RequestIdConfig is the configuration for the request ID middleware
type RequestIdMode ¶ added in v0.3.0
type RequestIdMode int
const ( AcceptFromHeader RequestIdMode = iota AlwaysGenerate )
func ParseRequestId ¶ added in v0.3.0
func ParseRequestId(s string) RequestIdMode
func (*RequestIdMode) SetValue ¶ added in v0.3.0
func (f *RequestIdMode) SetValue(s string) error
func (RequestIdMode) String ¶ added in v0.3.0
func (r RequestIdMode) String() string
Click to show internal directories.
Click to hide internal directories.