1
0
mirror of https://github.com/redis/go-redis.git synced 2025-08-06 01:35:48 +03:00

Pass network and addr to dialer

This commit is contained in:
Vladimir Mihailenco
2019-05-18 14:00:07 +03:00
parent 90febb9820
commit 3da4357c0c
5 changed files with 24 additions and 11 deletions

View File

@@ -53,6 +53,8 @@ type ClusterOptions struct {
// Following options are copied from Options struct.
Dialer func(network, addr string) (net.Conn, error)
OnConnect func(*Conn) error
Password string
@@ -122,6 +124,7 @@ func (opt *ClusterOptions) clientOptions() *Options {
const disableIdleCheck = -1
return &Options{
Dialer: opt.Dialer,
OnConnect: opt.OnConnect,
MaxRetries: opt.MaxRetries,