mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
clientv3: keep NewFromURL the same, add method NewFromURLs
This commit is contained in:
parent
e1bf612ee8
commit
ad448fb280
@ -90,7 +90,12 @@ func NewCtxClient(ctx context.Context) *Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NewFromURL creates a new etcdv3 client from a URL.
|
// NewFromURL creates a new etcdv3 client from a URL.
|
||||||
func NewFromURL(urls []string) (*Client, error) {
|
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})
|
return New(Config{Endpoints: urls})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user