forked from TrueCloudLab/frostfs-node
[#1422] node: Use dialer source for SDK cache
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
74db735265
commit
6c96cc2af6
4 changed files with 22 additions and 12 deletions
25
pkg/network/cache/multi.go
vendored
25
pkg/network/cache/multi.go
vendored
|
@ -60,18 +60,21 @@ func (x *multiClient) createForAddress(ctx context.Context, addr network.Address
|
|||
prmInit.Key = *x.opts.Key
|
||||
}
|
||||
|
||||
grpcOpts := []grpc.DialOption{
|
||||
grpc.WithChainUnaryInterceptor(
|
||||
metrics.NewUnaryClientInterceptor(),
|
||||
tracing.NewUnaryClientInteceptor(),
|
||||
),
|
||||
grpc.WithChainStreamInterceptor(
|
||||
metrics.NewStreamClientInterceptor(),
|
||||
tracing.NewStreamClientInterceptor(),
|
||||
),
|
||||
grpc.WithContextDialer(x.opts.DialerSource.GrpcContextDialer()),
|
||||
}
|
||||
|
||||
prmDial := client.PrmDial{
|
||||
Endpoint: addr.URIAddr(),
|
||||
GRPCDialOptions: []grpc.DialOption{
|
||||
grpc.WithChainUnaryInterceptor(
|
||||
metrics.NewUnaryClientInterceptor(),
|
||||
tracing.NewUnaryClientInteceptor(),
|
||||
),
|
||||
grpc.WithChainStreamInterceptor(
|
||||
metrics.NewStreamClientInterceptor(),
|
||||
tracing.NewStreamClientInterceptor(),
|
||||
),
|
||||
},
|
||||
Endpoint: addr.URIAddr(),
|
||||
GRPCDialOptions: grpcOpts,
|
||||
}
|
||||
if x.opts.DialTimeout > 0 {
|
||||
prmDial.DialTimeout = x.opts.DialTimeout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue