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
44ca2dde
Commit
44ca2dde
authored
Oct 12, 2019
by
王洁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
membercard
parent
dc4136c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
140 additions
and
0 deletions
+140
-0
src/Common/Pool/Config/MemberCardPoolConfig.php
+109
-0
src/MemberCard/Lib/MemberCardInterface.php
+31
-0
No files found.
src/Common/Pool/Config/MemberCardPoolConfig.php
0 → 100644
View file @
44ca2dde
<?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
;
use
Swoft\Bean\Annotation\Value
;
/**
* @Bean()
* the config of service bargain
*/
class
MemberCardPoolConfig
extends
PoolProperties
{
public
function
__construct
()
{
// 区别本地和线上的RPC服务地址
$this
->
uri
=
explode
(
','
,
env
(
'RPC_MEMBERCARD_URI'
,
'membercard:8099'
));
}
protected
$name
=
'membercard'
;
/**
* Minimum active number of connections
*
* @var int
*/
protected
$minActive
=
5
;
/**
* the maximum number of active connections
*
* @var int
*/
protected
$maxActive
=
300
;
/**
* the maximum number of wait connections
*
* @var int
*/
protected
$maxWait
=
400
;
/**
* 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
=
200
;
/**
* the addresses of connection
*
* <pre>
* [
* '127.0.0.1:88',
* '127.0.0.1:88'
* ]
* </pre>
* @Value(name="", env="${RPC_BARGAIN_URI}")
* @var array
*/
protected
$uri
=
[
'membercard:8099'
,
];
/**
* 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/MemberCard/Lib/MemberCardInterface.php
0 → 100644
View file @
44ca2dde
<?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\MemberCard\Lib
;
use
Swoft\Core\ResultInterface
;
/**
* The interface of demo service
*
* @method ResultInterface deferGetWxMsg(array $msgArr)
*/
interface
MemberCardInterface
{
/**
*接收微信消息事件
*
*
* @param [array] $msgArr
* @return int
*/
public
function
getWxMsg
(
array
$msgArr
);
}
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