grpc

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultTimerOptions

func DefaultTimerOptions() instrument.TimerOptions

DefaultTimerOptions returns a sane default timer options with buckets from 1ms to 10mins.

func StreamClientInterceptor

func StreamClientInterceptor(
	opts InterceptorInstrumentOptions,
) func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error)

StreamClientInterceptor provides tally metrics for client streams.

func UnaryClientInterceptor

func UnaryClientInterceptor(
	opts InterceptorInstrumentOptions,
) func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error

UnaryClientInterceptor provides tally metrics for client unary calls.

Types

type InterceptorInstrumentOptions

type InterceptorInstrumentOptions struct {
	// Scope, required.
	Scope tally.Scope
	// TimerOptions, optional and if not set will use defaults.
	TimerOptions *instrument.TimerOptions
}

InterceptorInstrumentOptions is a set of options for instrumented interceptors.

Jump to

Keyboard shortcuts

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