rpcutil

package
v0.0.0-...-b314878 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

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.

Jump to

Keyboard shortcuts

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