Commit 860f216e by 王召彬

修改连接池地址配置

parent b8b20679
...@@ -12,7 +12,6 @@ namespace Hdll\Services\Common\Pool\Config; ...@@ -12,7 +12,6 @@ namespace Hdll\Services\Common\Pool\Config;
use Swoft\Bean\Annotation\Bean; use Swoft\Bean\Annotation\Bean;
use Swoft\Pool\PoolProperties; use Swoft\Pool\PoolProperties;
use Swoft\Bean\Annotation\Value;
/** /**
* the config of service user * the config of service user
...@@ -21,6 +20,11 @@ use Swoft\Bean\Annotation\Value; ...@@ -21,6 +20,11 @@ use Swoft\Bean\Annotation\Value;
*/ */
class ReservationPoolConfig extends PoolProperties class ReservationPoolConfig extends PoolProperties
{ {
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_RESERVATION_URI', '172.21.0.11:8099,172.16.255.6:8099'));
}
protected $name = 'reservation'; protected $name = 'reservation';
...@@ -75,10 +79,9 @@ class ReservationPoolConfig extends PoolProperties ...@@ -75,10 +79,9 @@ class ReservationPoolConfig extends PoolProperties
* '127.0.0.1:88' * '127.0.0.1:88'
* ] * ]
* </pre> * </pre>
* @Value(name="", env="${RPC_RESERVATION_URI}")
* @var array * @var array
*/ */
protected $uri = ['172.21.0.11:8099','172.16.255.6:8099']; protected $uri = [];
/** /**
* whether to user provider(consul/etcd/zookeeper) * whether to user provider(consul/etcd/zookeeper)
......
...@@ -12,7 +12,6 @@ namespace Hdll\Services\Common\Pool\Config; ...@@ -12,7 +12,6 @@ namespace Hdll\Services\Common\Pool\Config;
use Swoft\Bean\Annotation\Bean; use Swoft\Bean\Annotation\Bean;
use Swoft\Pool\PoolProperties; use Swoft\Pool\PoolProperties;
use Swoft\Bean\Annotation\Value;
/** /**
* the config of service user * the config of service user
...@@ -21,6 +20,11 @@ use Swoft\Bean\Annotation\Value; ...@@ -21,6 +20,11 @@ use Swoft\Bean\Annotation\Value;
*/ */
class SchedulePoolConfig extends PoolProperties class SchedulePoolConfig extends PoolProperties
{ {
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_SCHEDULE_URI', '172.21.0.23:8099,172.16.255.197:8099'));
}
protected $name = 'schedule'; protected $name = 'schedule';
...@@ -75,10 +79,9 @@ class SchedulePoolConfig extends PoolProperties ...@@ -75,10 +79,9 @@ class SchedulePoolConfig extends PoolProperties
* '127.0.0.1:88' * '127.0.0.1:88'
* ] * ]
* </pre> * </pre>
* @Value(name="", env="${RPC_SCHEDULE_URI}")
* @var array * @var array
*/ */
protected $uri = ['172.21.0.23:8099','172.16.255.197:8099']; protected $uri = [];
/** /**
* whether to user provider(consul/etcd/zookeeper) * whether to user provider(consul/etcd/zookeeper)
......
...@@ -12,7 +12,6 @@ namespace Hdll\Services\Common\Pool\Config; ...@@ -12,7 +12,6 @@ namespace Hdll\Services\Common\Pool\Config;
use Swoft\Bean\Annotation\Bean; use Swoft\Bean\Annotation\Bean;
use Swoft\Pool\PoolProperties; use Swoft\Pool\PoolProperties;
use Swoft\Bean\Annotation\Value;
/** /**
* the config of service user * the config of service user
...@@ -21,6 +20,11 @@ use Swoft\Bean\Annotation\Value; ...@@ -21,6 +20,11 @@ use Swoft\Bean\Annotation\Value;
*/ */
class StorePoolConfig extends PoolProperties class StorePoolConfig extends PoolProperties
{ {
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_STORE_URI', '172.21.0.44:8099,172.16.255.190:8099'));
}
protected $name = 'storeId'; protected $name = 'storeId';
...@@ -75,10 +79,9 @@ class StorePoolConfig extends PoolProperties ...@@ -75,10 +79,9 @@ class StorePoolConfig extends PoolProperties
* '127.0.0.1:88' * '127.0.0.1:88'
* ] * ]
* </pre> * </pre>
* @Value(name="", env="${RPC_STORE_URI}")
* @var array * @var array
*/ */
protected $uri = ['172.21.0.44:8099','172.16.255.190:8099']; protected $uri = [];
/** /**
* whether to user provider(consul/etcd/zookeeper) * whether to user provider(consul/etcd/zookeeper)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment