limingxinleo / swoft-rpc
Swoft
1.0.1
2018-11-03 10:25 UTC
Requires
- php: >=7.0
- swoft/framework: ^1.0.24
- swoft/rpc-client: ^1.0
- swoft/service-governance: ^1.0
Requires (Dev)
- phpunit/phpunit: ^5.7
- swoft/swoole-ide-helper: dev-master
This package is auto-updated.
Last update: 2024-11-29 05:03:50 UTC
README
用于封装常用的Breaker和ServicePool
自定义的Breaker和ServicePool需要继承当前类库进行实现。
安装
composer require limingxinleo/swoft-rpc
基本配置 app.php
return [
...
'service' => [
'default' => [
'name' => 'service',
'uri' => [
'127.0.0.1:8099',
'127.0.0.1:8099',
],
'minActive' => 8,
'maxActive' => 8,
'maxWait' => 8,
'maxWaitTime' => 3,
'maxIdleTime' => 60,
'timeout' => 8,
'useProvider' => false,
'balancer' => 'random',
'provider' => 'consul',
]
],
'breaker' => [
'default' => [
'failCount' => 3,
'successCount' => 3,
'delayTime' => 500,
],
],
'components' => [
'custom' => [
'Swoftx\\Rpc\\'
],
],
];