interceptor

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package interceptor provides gRPC unary server interceptors for common concerns such as logging, metrics, rate limiting, and panic recovery.

Package interceptor provides gRPC unary server interceptors for common concerns such as logging, metrics, rate limiting, and panic recovery.

Package interceptor provides gRPC unary server interceptors for common concerns such as logging, metrics, rate limiting, and panic recovery.

Package interceptor provides gRPC unary server interceptors for common concerns such as logging, metrics, rate limiting, and panic recovery.

Package interceptor provides gRPC unary server interceptors for common concerns such as logging, metrics, rate limiting, and panic recovery.

Package interceptor provides gRPC unary server interceptors for common concerns such as logging, metrics, rate limiting, and panic recovery.

Index

Constants

View Source
const RequestIDKey = "x-request-id"

RequestIDKey is the key used for the request ID in gRPC metadata.

Variables

This section is empty.

Functions

func DisableValidateInterceptor

func DisableValidateInterceptor()

DisableValidateInterceptor disables the validation interceptor.

func GetRequestID

func GetRequestID(ctx context.Context) string

GetRequestID extracts the request ID from the context, for use in logging and tracing.

func NewGrpcServerWithInterceptors

func NewGrpcServerWithInterceptors() *grpc.Server

NewGrpcServerWithInterceptors creates a new gRPC server with the predefined chain of unary interceptors. This simplifies server setup by providing a standard set of middleware.

Types

This section is empty.

Jump to

Keyboard shortcuts

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