ateinterceptors

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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