ateinterceptors

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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. A handler's error reaches the caller with the code apierror gives it; any other error, including a status received from an upstream service, is Internal with its full text.

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)

ServerUnaryInterceptor is for ateapi. A handler's error reaches the caller with the code apierror gives it; any other error, including a status received from an upstream service, is Internal.

Request and response bodies are logged as they are: redaction of debug_redact fields happens in the shared slog handler (internal/contextlogging) that serverboot's InitLogger and InitLoggerWithWriter install as the default logger in every server, so it also covers protos logged anywhere else in the process.

Types

This section is empty.

Jump to

Keyboard shortcuts

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