tan-github / apollo-client
apollo客户端
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/tan-github/apollo-client
README
apollo客户端
$config_server = 'http://192.168.1.236:30005'; $app_id = 'zsy-test'; $namespaces = array('application'); //项目配置目录 $config_path = './config'; //集群 $env = 'testing'; $apollo = new \Apollo\Client\ApolloClient($config_server, $app_id, $namespaces); $apollo->setCluster($env); $apollo->setSaveDir($config_path); $error_msg = $apollo->start();
if ($error_msg) { echo 'Apollo配置更新失败,错误信息:'.$error_msg . PHP_EOL; }else { echo 'Apollo配置更新完成' . PHP_EOL; }