code: func NewEtcdClient(machines []string, cert, key, caCert string, basicAuth bool, username string, password string) (*Client, error) {
  	cfg := clientv3.Config{
  		Endpoints:            machines,
  		DialTimeout:          5 * time.Second,
  		DialKeepAliveTime:    10 * time.Second,
  		DialKeepAliveTimeout: 3 * time.Second,
  	}
  
  	if basicAuth {
  		cfg.Username = username
  		cfg.Password = password
  	}
  
  	tlsEnabled := false
  	tlsConfig := &tls.Config{
  		InsecureSkipVerify: false,
  	}
  
  	if caCert != "" {
  		certBytes, err := ioutil.ReadFile(caCert)
  		if err != nil {
  			return &Client{}, err
  		}
  
  		caCertPool := x509.NewCertPool()
  		ok := caCertPool.AppendCertsFromPEM(certBytes)
  
  		if ok {
  			tlsConfig.RootCAs = caCertPool
  		}
  		tlsEnabled = true
  	}
  
  	if cert != "" && key != "" {
  		tlsCert, err := tls.LoadX509KeyPair(cert, key)
  		if err != nil {
  			return &Client{}, err
  		}
  		tlsConfig.Certificates = []tls.Certificate{tlsCert}
  		tlsEnabled = true
  	}
  
  	if tlsEnabled {
  		cfg.TLS = tlsConfig
  	}
  	
  	client, err := clientv3.New(cfg)
  	if err != nil {
  		return &Client{}, err
  	}
  	
  	return &Client{client, make(map[string]*Watch), sync.Mutex{}}, nil
  }
docs: // NewEtcdClient returns an *etcdv3.Client with a connection to named machines.