Merge pull request #9491 from jiaxuanzhou/clientv3

clientv3: optimize func NewFromURL
This commit is contained in:
Gyuho Lee 2018-03-27 04:31:31 -07:00 committed by GitHub
commit 2b7783028f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,6 +94,11 @@ func NewFromURL(url string) (*Client, error) {
return New(Config{Endpoints: []string{url}})
}
// NewFromURLs creates a new etcdv3 client from URLs.
func NewFromURLs(urls []string) (*Client, error) {
return New(Config{Endpoints: urls})
}
// Close shuts down the client's etcd connections.
func (c *Client) Close() error {
c.cancel()