Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRequestID ¶
getRequestID extracts request ID from metadata.
func LoggingInterceptor ¶
func LoggingInterceptor(log logger.Logger) grpc.UnaryServerInterceptor
LoggingInterceptor logs each incoming gRPC request with duration and status. It uses the provided logger to log the information.
func RecoverInterceptor ¶
func RecoverInterceptor(log logger.Logger) grpc.UnaryServerInterceptor
RecoverInterceptor returns a unary interceptor that recovers from panics and converts them into gRPC internal errors with stack trace logging.
func RequestIDInterceptor ¶
func RequestIDInterceptor() grpc.UnaryServerInterceptor
RequestIDInterceptor ensures that a request ID is present in the context metadata. If one is missing, it generates a new UUID and injects it.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.