Commit 99f09097 by xmy

连接池修改

parent 677757bc
<?php
/**
* This file is part of Swoft.
*
* @link https://swoft.org
* @document https://doc.swoft.org
* @contact group@swoft.org
* @license https://github.com/swoft-cloud/swoft/blob/master/LICENSE
*/
namespace Hdll\Services\Common\Pool\Config;
use Swoft\Bean\Annotation\Bean;
use Swoft\Pool\PoolProperties;
/**
* the config of service user
*
* @Bean()
*/
class GoodsPoolConfig extends PoolProperties
{
protected $name = 'seller';
/**
* Minimum active number of connections
*
* @var int
*/
protected $minActive = 5;
/**
* the maximum number of active connections
*
* @var int
*/
protected $maxActive = 50;
/**
* the maximum number of wait connections
*
* @var int
*/
protected $maxWait = 100;
/**
* Maximum waiting time
*
* @var int
*/
protected $maxWaitTime = 3;
/**
* Maximum idle time
*
* @var int
*/
protected $maxIdleTime = 60;
/**
* the time of connect timeout
*
* @var int
*/
protected $timeout = 5;
/**
* the addresses of connection
*
* <pre>
* [
* '127.0.0.1:88',
* '127.0.0.1:88'
* ]
* </pre>
*
* @var array
*/
protected $uri = [
'192.168.3.39:8400',
];
/**
* whether to user provider(consul/etcd/zookeeper)
*
* @var bool
*/
protected $useProvider = false;
/**
* the default balancer is random balancer
*
* @var string
*/
protected $balancer = '';
/**
* the default provider is consul provider
*
* @var string
*/
protected $provider = '';
}
......@@ -63,7 +63,7 @@ class SellerDistributionPoolConfig extends PoolProperties
*
* @var int
*/
protected $timeout = 200;
protected $timeout = 5;
/**
* the addresses of connection
......
......@@ -63,7 +63,7 @@ class SellerPoolConfig extends PoolProperties
*
* @var int
*/
protected $timeout = 200;
protected $timeout = 5;
/**
* the addresses of connection
......
......@@ -63,7 +63,7 @@ class VipPoolConfig extends PoolProperties
*
* @var int
*/
protected $timeout = 200;
protected $timeout = 5;
/**
* the addresses of connection
......
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/8/8
* Time: 10:43
*/
namespace Hdll\Services\Goods\Lib;
use Swoft\Core\ResultInterface;
/**
* @method ResultInterface deferGet($storeId,$id)
* @method ResultInterface deferGetList($storeId,$page,$limit)
* Interface GoodsInterface
* @package Hdll\Services\Goods\Lib
*/
interface GoodsInterface{
/**
* 获取商品
* @param $storeId
* @param $id
* @return mixed
* @author Administrator
*/
public function get($storeId,$id);
/**
* 获取商品列表
* @param $storeId
* @param $page
* @param $limit
* @return mixed
* @author Administrator
*/
public function getList($storeId,$page,$limit);
}
\ No newline at end of file
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