in dubbo/client.py [0:0]
def _get_configurators_from_zk(self, interface):
"""
试图从配置中取出权重相关的信息
:param interface:
:return:
"""
configurators = self.zk.get_children(DUBBO_ZK_CONFIGURATORS.format(interface), watch=self._watch_configurators)
if configurators:
configurators = map(parse_url, configurators)
conf = {}
for configurator in configurators:
conf[configurator['host']] = configurator['fields'].get('weight', 100) # 默认100
self.weights[interface] = conf