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 FromContext ¶
FromContext extracts the request-id from the context, if it exists.
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.