requestid

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RequestIDMetadataKey is the key in the gRPC
	// metadata.
	RequestIDMetadataKey = "x-request-id"
	RequestIDLogKey      = "request-id"
)

Variables

This section is empty.

Functions

func GetRequestID

func GetRequestID(ctx context.Context) string

func UnaryServerInterceptor

func UnaryServerInterceptor() grpc.UnaryServerInterceptor

UnaryServerInterceptor returns a server interceptor that add a request ID to the incoming metadata if there is none.

Types

This section is empty.

Jump to

Keyboard shortcuts

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