Documentation ¶
Overview ¶
Package interceptors contains gRPC server interceptors used to track the timestamp of the most recent request.
Index ¶
- Constants
- func LatestRequestTimestamp() time.Time
- func NewTruncInterceptor(maxResponseSize int, dumpDir string) grpc.UnaryServerInterceptor
- func StreamServerInterceptor(srv interface{}, ss grpc.ServerStream, _ *grpc.StreamServerInfo, ...) error
- func UnaryServerInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, ...) (interface{}, error)
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.