func New(cfg Config) (*Client, error) {
	if len(cfg.Endpoints) == 0 {
		return nil, ErrNoAvailableEndpoints
	}
	return newClient(&cfg)
}
New creates a new etcdv3 client from a given configuration.
package clientv3
import (
	"context"
	"crypto/tls"
	"errors"
	"fmt"
	"net"
	"net/url"
	"strconv"
	"strings"
	"sync"
	"time"
	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
	"google.golang.org/grpc"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/credentials"
	"google.golang.org/grpc/keepalive"
	"google.golang.org/grpc/metadata"
	"google.golang.org/grpc/status"
)
var (
	ErrNoAvailableEndpoints = errors.New("etcdclient: no available endpoints")
	ErrOldCluster           = errors.New("etcdclient: old cluster version")
)
type Client struct {
	Cluster
	KV
	Lease
	Watcher
	Auth
	Maintenance
	conn     *grpc.ClientConn
	dialerrc chan error
	cfg      Config
	creds    *credentials.TransportCredentials
	balancer *healthBalancer
	mu       *sync.Mutex
	ctx    context.Context
	cancel context.CancelFunc
	Username string
	Password string
	tokenCred *authTokenCredential
	callOpts []grpc.CallOption
}