Documentation
¶
Overview ¶
Package requestid contains middleware to inject and manage request id context.
Index ¶
Constants ¶
View Source
const ( // RequestIDHeader defines the HTTP header that is set in each HTTP response // for a given request. The value of the header is unique per request. RequestIDHeader = "X-Request-Id" )
Variables ¶
This section is empty.
Functions ¶
func InitRequestID ¶ added in v1.5.4
InitRequestID returns the ID to be used to identify the request. If tracing is enabled, returns trace ID, e.g. "1e20da43269fe07e3d2ac018c0aad2d1". Otherwise returns a new UUID, e.g. "38fee7ac-4bfe-4cf6-baa2-8b5ec296b485".
func NewStreamingInterceptor ¶
func NewStreamingInterceptor() grpc.StreamServerInterceptor
NewStreamingInterceptor creates a grpc.StreamServerInterceptor which must come after the trace interceptor and before the logging interceptor.
func NewUnaryInterceptor ¶
func NewUnaryInterceptor() grpc.UnaryServerInterceptor
NewUnaryInterceptor creates a grpc.UnaryServerInterceptor which must come after the trace interceptor and before the logging interceptor.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.