kragniz / python-etcd3

Python client for the etcd API v3
Apache License 2.0
432 stars 183 forks source link

Multiple hosts of cluster #1551

Open r350178982 opened 3 years ago

r350178982 commented 3 years ago

Good day fellas! Is there any possible to create a client by using multiple hosts(say three) in cluster? for example, client = etcd3.client(hosts=[xxxx.xxxx, xxxx, xxx]) and something like this. Or is there some other way to meet my need?

ainoniwa commented 3 years ago

Probably, you can use this dirty hack...

>>> import etcd3
>>> host, port = "ipv4:10.0.0.1:2379,10.0.0.2:2379,10.0.0.3", 2379
>>> c = etcd3.client(host, port)