python-etcd3
python-etcd3 copied to clipboard
Why not support multi-hosts in etcd v3 client
In etcd v2 python client, It is allowed to input multi-hosts to improve the high availability, But in etcd v3 python client, only one host is allowed , anyone knows why?
V3:
class Etcd3Client(object):
def __init__(self, host='localhost', port=2379,
ca_cert=None, cert_key=None, cert_cert=None, timeout=None,
user=None, password=None, grpc_options=None):
self._url = '{host}:{port}'.format(host=host, port=port)
self.metadata = None
v2:
class Client(object):
"""
Client for etcd, the distributed log service using raft.
"""
_MGET = 'GET'
_MPUT = 'PUT'
_MPOST = 'POST'
_MDELETE = 'DELETE'
_comparison_conditions = set(('prevValue', 'prevIndex', 'prevExist', 'refresh'))
_read_options = set(('recursive', 'wait', 'waitIndex', 'sorted', 'quorum'))
_del_conditions = set(('prevValue', 'prevIndex'))
http = None
def __init__(
self,
host='127.0.0.1',
port=4001,
srv_domain=None,
version_prefix='/v2',
read_timeout=60,
allow_redirect=True,
protocol='http',
cert=None,
ca_cert=None,
username=None,
password=None,
allow_reconnect=False,
use_proxies=False,
expected_cluster_id=None,
per_host_pool_size=10,
lock_prefix="/_locks"
):
"""
Initialize the client.
Args:
host (mixed):
If a string, IP to connect to.
**If a tuple ((host, port), (host, port), ...)**
port (int): Port used to connect to etcd.
Hello, can you tell me the version number containing V2. thanks!
Hello, can you tell me the version number containing V2. thanks!
The package of etcd v2 python client here: https://pypi.org/project/python-etcd/ The source codes here: https://github.com/jplana/python-etcd/blob/master/src/etcd/client.py
+1
+1 need it
what's wrong with #106, it's something really useful
what's wrong with #106, it's something really useful
But that doesn't solve the problem
Any progress on this feature? Domain with multiple IP addresses doesn't work either, address is resolved once client is created.
Any progress on this feature?
+1 need this!
when release i can see its merged to master but not released yet
+1 need this
MultiEndpointEtcd3Client
+1 need this!!!