interceptors

package
v0.0.0-...-bf8e85a Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package interceptors contains gRPC server interceptors used to track the timestamp of the most recent request.

Index

Constants

View Source
const DumpNameRegexPattern = `^execution-\w{8}-\w{4}-\w{4}-\w{4}-\w{12}.dump$`

DumpNameRegexPattern is a pattern of the names of the dump files generated by TruncInterceptor

Variables

This section is empty.

Functions

func LatestRequestTimestamp

func LatestRequestTimestamp() time.Time

LatestRequestTimestamp returns the most recent timestamp at which a unary / stream RPC was received.

func NewTruncInterceptor

func NewTruncInterceptor(maxResponseSize int, dumpDir string) grpc.UnaryServerInterceptor

NewTruncInterceptor creates an interceptor truncating the response to maxResponseSize

func StreamServerInterceptor

func StreamServerInterceptor(srv interface{}, ss grpc.ServerStream, _ *grpc.StreamServerInfo, handler grpc.StreamHandler) error

StreamServerInterceptor intercepts stream RPCs and keeps track of the latest request timestamp.

func UnaryServerInterceptor

func UnaryServerInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

UnaryServerInterceptor intercepts unary RPCs and keeps track of the latest request timestamp.

Types

This section is empty.

Jump to

Keyboard shortcuts

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