Documentation ¶
Index ¶
- func StreamTracingInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, ...) (grpc.ClientStream, error)
- func TimeoutInterceptor(timeout time.Duration) grpc.UnaryClientInterceptor
- func UnaryPrometheusInterceptor(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, ...) error
- func UnaryTracingInterceptor(ctx context.Context, method string, req, reply interface{}, ...) error
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.
Click to show internal directories.
Click to hide internal directories.