Browse Source

Merge pull request #9491 from jiaxuanzhou/clientv3

clientv3: optimize func NewFromURL
Gyuho Lee 7 years ago
parent
commit
2b7783028f
1 changed files with 5 additions and 0 deletions
  1. 5 0
      clientv3/client.go

+ 5 - 0
clientv3/client.go

@@ -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()