python-etcd3 icon indicating copy to clipboard operation
python-etcd3 copied to clipboard

Multiple hosts of cluster

Open r350178982 opened this issue 3 years ago • 1 comments

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?

r350178982 avatar Apr 26 '21 06:04 r350178982

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)

ainoniwa avatar May 21 '21 08:05 ainoniwa