Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/gitaly/client/dial.go')
-rw-r--r--internal/gitaly/client/dial.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/internal/gitaly/client/dial.go b/internal/gitaly/client/dial.go
index 84800995d..b0b558543 100644
--- a/internal/gitaly/client/dial.go
+++ b/internal/gitaly/client/dial.go
@@ -129,11 +129,6 @@ func Dial(ctx context.Context, rawAddress string, connOpts []grpc.DialOption, ha
Time: 20 * time.Second,
PermitWithoutStream: true,
}),
- UnaryInterceptor(),
- grpc.WithChainStreamInterceptor(
- grpctracing.StreamClientTracingInterceptor(),
- grpccorrelation.StreamClientCorrelationInterceptor(),
- ),
)
conn, err := grpc.DialContext(ctx, canonicalAddress, connOpts...)
@@ -144,6 +139,14 @@ func Dial(ctx context.Context, rawAddress string, connOpts []grpc.DialOption, ha
return conn, nil
}
+// StreamInterceptor returns the stream interceptors that should be configured for a client.
+func StreamInterceptor() grpc.DialOption {
+ return grpc.WithChainStreamInterceptor(
+ grpctracing.StreamClientTracingInterceptor(),
+ grpccorrelation.StreamClientCorrelationInterceptor(),
+ )
+}
+
// UnaryInterceptor returns the unary interceptors that should be configured for a client.
func UnaryInterceptor() grpc.DialOption {
return grpc.WithChainUnaryInterceptor(