Documentation
¶
Index ¶
- Constants
- func InternalServerUnaryInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, ...) (any, error)
- func MaxDeadlineUnaryInterceptor(maxDeadline time.Duration) grpc.UnaryServerInterceptor
- func RejectUnknownFieldsUnaryInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, ...) (any, error)
- func ServerUnaryInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, ...) (any, error)
Constants ¶
View Source
const ServerElapsedTrailer = "x-server-elapsed-us"
ServerElapsedTrailer carries the server's handler duration in microseconds, so clients can report a latency unaffected by their own scheduling overhead.
Variables ¶
This section is empty.
Functions ¶
func InternalServerUnaryInterceptor ¶
func InternalServerUnaryInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)
InternalServerUnaryInterceptor is for internal services to return full gRPC errors with specific error codes and debugging details.
func MaxDeadlineUnaryInterceptor ¶
func MaxDeadlineUnaryInterceptor(maxDeadline time.Duration) grpc.UnaryServerInterceptor
MaxDeadlineUnaryInterceptor returns an interceptor that caps the request context at maxDeadline.
func RejectUnknownFieldsUnaryInterceptor ¶
func RejectUnknownFieldsUnaryInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)
RejectUnknownFieldsUnaryInterceptor refuses any request carrying a field this binary has no descriptor for, at any level of nesting.
func ServerUnaryInterceptor ¶
func ServerUnaryInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.