func NewFromConfigFile(path string) (*Client, error) {
	cfg, err := configFromFile(path)
	if err != nil {
		return nil, err
	}
	return New(*cfg)
}
NewFromConfigFile creates a new etcdv3 client from a configuration file.
package clientv3
import (
	"crypto/tls"
	"errors"
	"fmt"
	"net"
	"net/url"
	"strings"
	"sync"
	"time"
	"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
	prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
	"golang.org/x/net/context"
	"google.golang.org/grpc"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/credentials"
	"google.golang.org/grpc/metadata"
)
var (
	ErrNoAvailableEndpoints = errors.New("etcdclient: no available endpoints")
)
type Client struct {
	Cluster
	KV
	Lease
	Watcher
	Auth
	Maintenance
	conn             *grpc.ClientConn
	cfg              Config
	creds            *credentials.TransportCredentials
	balancer         *simpleBalancer
	retryWrapper     retryRpcFunc
	retryAuthWrapper retryRpcFunc
	ctx    context.Context
	cancel context.CancelFunc
	Username string
	Password string
	tokenCred *authTokenCredential
}
func New(cfg Config) (*Client, error) {
	if len(cfg.Endpoints) == 0 {
		return nil, ErrNoAvailableEndpoints
	}
	return newClient(&cfg)
}
func NewFromURL(url string) (*Client, error) {
	return New(Config{Endpoints: []string{url}})
}