Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
services
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tencent
services
Commits
2be37829
Commit
2be37829
authored
Aug 10, 2018
by
feixiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
c5a1319c
b939a912
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
137 additions
and
3 deletions
+137
-3
src/Common/Pool/Config/GoodsPoolConfig.php
+104
-0
src/Common/Pool/Config/SellerDistributionPoolConfig.php
+1
-1
src/Common/Pool/Config/SellerPoolConfig.php
+1
-1
src/Common/Pool/Config/VipPoolConfig.php
+1
-1
src/Goods/Lib/GoodsInterface.php
+30
-0
No files found.
src/Common/Pool/Config/GoodsPoolConfig.php
0 → 100644
View file @
2be37829
<?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
=
''
;
}
src/Common/Pool/Config/SellerDistributionPoolConfig.php
View file @
2be37829
...
@@ -63,7 +63,7 @@ class SellerDistributionPoolConfig extends PoolProperties
...
@@ -63,7 +63,7 @@ class SellerDistributionPoolConfig extends PoolProperties
*
*
* @var int
* @var int
*/
*/
protected
$timeout
=
200
;
protected
$timeout
=
5
;
/**
/**
* the addresses of connection
* the addresses of connection
...
...
src/Common/Pool/Config/SellerPoolConfig.php
View file @
2be37829
...
@@ -63,7 +63,7 @@ class SellerPoolConfig extends PoolProperties
...
@@ -63,7 +63,7 @@ class SellerPoolConfig extends PoolProperties
*
*
* @var int
* @var int
*/
*/
protected
$timeout
=
200
;
protected
$timeout
=
5
;
/**
/**
* the addresses of connection
* the addresses of connection
...
...
src/Common/Pool/Config/VipPoolConfig.php
View file @
2be37829
...
@@ -63,7 +63,7 @@ class VipPoolConfig extends PoolProperties
...
@@ -63,7 +63,7 @@ class VipPoolConfig extends PoolProperties
*
*
* @var int
* @var int
*/
*/
protected
$timeout
=
200
;
protected
$timeout
=
5
;
/**
/**
* the addresses of connection
* the addresses of connection
...
...
src/Goods/Lib/GoodsInterface.php
0 → 100644
View file @
2be37829
<?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)
* Interface GoodsInterface
* @package Hdll\Services\Goods\Lib
*/
interface
GoodsInterface
{
/**
* 获取商品
* @param $storeId
* @param $id
* @return mixed
* @author Administrator
*/
public
function
get
(
$storeId
,
$id
);
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment