clientinterceptors

package
v0.0.0-...-157c77b Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamTracingInterceptor

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

StreamTracingInterceptor returns a grpc.StreamClientInterceptor for opentelemetry.

func TimeoutInterceptor

func TimeoutInterceptor(timeout time.Duration) grpc.UnaryClientInterceptor

TimeoutInterceptor 是一个用于控制超时的拦截器

func UnaryPrometheusInterceptor

func UnaryPrometheusInterceptor(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error

func UnaryTracingInterceptor

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

UnaryTracingInterceptor returns 一个用于 OpenTelemetry 的 grpc.UnaryClientInterceptor

Types

This section is empty.

Jump to

Keyboard shortcuts

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