Explorar el Código

clientv3: put "defaultCallOpts" back to "Client" object

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Gyuho Lee hace 8 años
padre
commit
dd520cebd4
Se han modificado 1 ficheros con 7 adiciones y 6 borrados
  1. 7 6
      clientv3/client.go

+ 7 - 6
clientv3/client.go

@@ -401,12 +401,13 @@ func newClient(cfg *Config) (*Client, error) {
 
 	ctx, cancel := context.WithCancel(baseCtx)
 	client := &Client{
-		conn:   nil,
-		cfg:    *cfg,
-		creds:  creds,
-		ctx:    ctx,
-		cancel: cancel,
-		mu:     new(sync.Mutex),
+		conn:     nil,
+		cfg:      *cfg,
+		creds:    creds,
+		ctx:      ctx,
+		cancel:   cancel,
+		mu:       new(sync.Mutex),
+		callOpts: defaultCallOpts,
 	}
 
 	if cfg.Username != "" && cfg.Password != "" {