mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-04 20:58:13 +08:00
目前apollo配置后台监控的实例列表的ip全是127.0.0.1, 没法正确监控到集群环境下每个服务器是否正确拉取到更新后的配置,增加了设置clientIp,用于区分不同服务器的请求
This commit is contained in:
parent
87a6aa7e5f
commit
bfaafd7a35
@ -24,7 +24,8 @@ class ClientFactory
|
||||
$option = make(Option::class);
|
||||
$option->setServer($config->get('apollo.server', 'http://127.0.0.1:8080'))
|
||||
->setAppid($config->get('apollo.appid', ''))
|
||||
->setCluster($config->get('apollo.cluster', ''));
|
||||
->setCluster($config->get('apollo.cluster', ''))
|
||||
->setClientIp(current(swoole_get_local_ip()));
|
||||
$namespaces = $config->get('apollo.namespaces', []);
|
||||
$callbacks = [];
|
||||
foreach ($namespaces as $namespace => $callable) {
|
||||
|
Loading…
Reference in New Issue
Block a user