Documentation ¶
Overview ¶
Package rpcutil contains utility functions for RPC handlers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var IdentityKindCounter = metric.NewCounter( "resultdb/rpc/identitykind", "Number of identities", nil, field.String("service"), field.String("method"), field.String("kind"), )
IdentityKindCounter is exported for testing.
Normally this counter is updated via IdentityKindCountingInterceptor().
Functions ¶
func IdentityKindCountingInterceptor ¶
func IdentityKindCountingInterceptor() grpc.UnaryServerInterceptor
IdentityKindCountingInterceptor returns a gRPC interceptor that updates a tsmon counter with the type of authenticated principal.
func RequestTimeoutInterceptor ¶
func RequestTimeoutInterceptor() grpc.UnaryServerInterceptor
RequestTimeoutInterceptor returns a gRPC interceptor that set context timeout based on the RPC name.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.