Commit 45dd6c15 by zhufx

1.买家连接池配置

parent bbe0120d
......@@ -8,7 +8,7 @@
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/
namespace App\Pool\Config;
namespace Hdll\Services\Common\Pool\Config;
use Swoft\Bean\Annotation\Bean;
use Swoft\Bean\Annotation\Value;
......@@ -24,56 +24,42 @@ class BuyerPoolConfig extends PoolProperties
/**
* the name of pool
*
* @Value(name="${config.service.user.name}", env="${USER_POOL_NAME}")
* @var string
*/
protected $name = '';
protected $name = 'buyer';
/**
* Minimum active number of connections
*
* @Value(name="${config.service.user.minActive}", env="${USER_POOL_MIN_ACTIVE}")
* @var int
*/
protected $minActive = 5;
/**
* the maximum number of active connections
*
* @Value(name="${config.service.user.maxActive}", env="${USER_POOL_MAX_ACTIVE}")
* @var int
*/
protected $maxActive = 50;
/**
* the maximum number of wait connections
*
* @Value(name="${config.service.user.maxWait}", env="${USER_POOL_MAX_WAIT}")
* @var int
*/
protected $maxWait = 100;
/**
* Maximum waiting time
*
* @Value(name="${config.service.user.maxWaitTime}", env="${USER_POOL_MAX_WAIT_TIME}")
* @var int
*/
protected $maxWaitTime = 3;
/**
* Maximum idle time
*
* @Value(name="${config.service.user.maxIdleTime}", env="${USER_POOL_MAX_IDLE_TIME}")
* @var int
*/
protected $maxIdleTime = 60;
/**
* the time of connect timeout
*
* @Value(name="${config.service.user.timeout}", env="${USER_POOL_TIMEOUT}")
* @var int
*/
protected $timeout = 200;
......@@ -96,24 +82,18 @@ class BuyerPoolConfig extends PoolProperties
/**
* whether to user provider(consul/etcd/zookeeper)
*
* @Value(name="${config.service.user.useProvider}", env="${USER_POOL_USE_PROVIDER}")
* @var bool
*/
protected $useProvider = false;
/**
* the default balancer is random balancer
*
* @Value(name="${config.service.user.balancer}", env="${USER_POOL_BALANCER}")
* @var string
*/
protected $balancer = '';
/**
* the default provider is consul provider
*
* @Value(name="${config.service.user.provider}", env="${USER_POOL_PROVIDER}")
* @var string
*/
protected $provider = '';
}
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