consul client agent 本地读取key value

任何一台client agent节点机器:

#!/usr/bin/python
#-*-coding:utf-8-*-
import time
import json
import consul

conn = consul.Consul()
a1 =  conn.kv.get('deploy/datacenter/info')
print a1

 

posted @ 2019-04-24 18:38  老农夫  阅读(975)  评论(0编辑  收藏  举报