clientinterceptors

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BreakerInterceptor

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

BreakerInterceptor is an interceptor that acts as a circuit breaker.

func DurationInterceptor

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

DurationInterceptor is an interceptor that logs the processing time.

func PrometheusInterceptor

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

PrometheusInterceptor is an interceptor that reports to prometheus server.

func StreamOpenTracingInterceptor

func StreamOpenTracingInterceptor() grpc.StreamClientInterceptor

StreamOpenTracingInterceptor returns a grpc.StreamClientInterceptor for opentelemetry.

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 is an interceptor that handles tracing for stream requests.

func TimeoutInterceptor

func TimeoutInterceptor(timeout time.Duration) grpc.UnaryClientInterceptor

TimeoutInterceptor is an interceptor that controls timeout.

func UnaryOpenTracingInterceptor

func UnaryOpenTracingInterceptor() grpc.UnaryClientInterceptor

UnaryOpenTracingInterceptor returns a grpc.UnaryClientInterceptor for opentelemetry.

func UnaryTracingInterceptor

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

UnaryTracingInterceptor is an interceptor that handles tracing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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