forked from TrueCloudLab/frostfs-node
[#1422] ir: Add dialer source
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
f7caef355b
commit
ef38420623
3 changed files with 40 additions and 6 deletions
|
@ -4,7 +4,6 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||
|
@ -157,15 +156,11 @@ func (c *Client) newCli(ctx context.Context, endpoint Endpoint) (*rpcclient.WSCl
|
|||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("read mtls certificates: %w", err)
|
||||
}
|
||||
var netDialContext func(ctx context.Context, network, addr string) (net.Conn, error)
|
||||
if c.cfg.dialerSource != nil { // TODO fix after IR
|
||||
netDialContext = c.cfg.dialerSource.NetContextDialer()
|
||||
}
|
||||
cli, err := rpcclient.NewWS(ctx, endpoint.Address, rpcclient.WSOptions{
|
||||
Options: rpcclient.Options{
|
||||
DialTimeout: c.cfg.dialTimeout,
|
||||
TLSClientConfig: cfg,
|
||||
NetDialContext: netDialContext,
|
||||
NetDialContext: c.cfg.dialerSource.NetContextDialer(),
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue