- 配置参数
配置参数
return [
'user' => [
'class' => ServiceClient::class,
'host' => '127.0.0.1',
'port' => 18307,
'setting' => [
'timeout' => 0.5,
'connect_timeout' => 1.0,
'write_timeout' => 10.0,
'read_timeout' => 0.5,
],
'packet' => bean('rpcClientPacket')
],
'user.pool' => [
'class' => ServicePool::class,
'client' => bean('user')
],
];
如上定义了一个 user
服务,连接池配置参数和其它一样。