123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <?php
- return [
- 'consumers' => [
- [
- // 用戶中心
- 'name' => 'UserService',
- 'service' => \App\JsonRpc\UserServiceInterface::class,
- // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
- 'nodes' => [
- ['host' => '127.0.0.1', 'port' => 9504],
- ],
- ],
- [
- // 权限管理
- 'name' => 'AuthorityService',
- 'service' => \App\JsonRpc\AuthorityServiceInterface::class,
- // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
- 'nodes' => [
- ['host' => '127.0.0.1', 'port' => 9504],
- ],
- ],
- [
- // 广告中心
- 'name' => 'AdService',
- 'service' => \App\JsonRpc\AdServiceInterface::class,
- // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
- 'nodes' => [
- ['host' => '127.0.0.1', 'port' => 9503],
- ],
- ],
- [
- //网站管理
- 'name' => 'WebsiteService',
- 'service' => \App\JsonRpc\WebsiteServiceInterface::class,
- // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
- 'nodes' => [
- ['host' => '127.0.0.1', 'port' => 9502],
- ],
- ],
- [
- //公共方法
- 'name' => 'PublicRpcService',
- 'service' => \App\JsonRpc\PublicRpcServiceInterface::class,
- // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
- 'nodes' => [
- ['host' => '127.0.0.1', 'port' => 9502],
- ],
- 'settings' => [
- 'open_length_check' => true,
- 'package_max_length' => 15 * 1024 * 1024, // 最大包长度
- 'package_length_type' => 'N',
- 'package_body_offset' => 8,
- 'package_length_offset' => 4,
- 'package_length_field' => 'length',
- ],
- 'options' => [
- 'connect_timeout' => 50.0, // 连接超时时间,单位为秒
- 'read_timeout' => 100.0, // 读取超时时间,单位为秒
- 'write_timeout' => 100.0, // 写入超时时间,单位为秒
- ],
- 'pool' => [
- 'min_connections' => 1,
- 'max_connections' => 30,
- 'connect_timeout' => 100.0, // 连接池连接超时时间,单位为秒
- 'wait_timeout' => 30.0, // 等待连接池可用连接的超时时间,单位为秒
- 'heartbeat' => -1, // 心跳检测间隔,-1 表示禁用心跳检测
- 'max_idle_time' => 60.0, // 连接的最大空闲时间,单位为秒
- ],
- ],
- [
- //资讯-新闻
- 'name' => 'NewsService',
- 'service' => \App\JsonRpc\NewsServiceInterface::class,
- // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
- 'nodes' => [
- ['host' => '127.0.0.1', 'port' => 9505],
- ],
- ],
- [
- //友情链接服务
- 'name' => 'LinkService',
- 'service' => \App\JsonRpc\LinkServiceInterface::class,
- // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
- 'nodes' => [
- ['host' => '127.0.0.1', 'port' => 9502],
- ],
- ],
- [
- //商圈服务
- 'name' => 'ChatService',
- 'service' => \App\JsonRpc\ChatServiceInterface::class,
- // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
- 'nodes' => [
- ['host' => '127.0.0.1', 'port' => 9507],
- ],
- ],
- [
- //广告订单服务
- 'name' => 'OrderService',
- 'service' => \App\JsonRpc\OrderServiceInterface::class,
- // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
- 'nodes' => [
- ['host' => '127.0.0.1', 'port' => 9508],
- ],
- ],
- [
- //采集器服务
- 'name' => 'CollectorService',
- 'service' => \App\JsonRpc\CollectorServiceInterface::class,
- // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
- 'nodes' => [
- ['host' => '127.0.0.1', 'port' => 9509],
- ],
- ],
- [
- //底部导航服务
- 'name' => 'FooterService',
- 'service' => \App\JsonRpc\FooterServiceInterface::class,
- // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
- 'nodes' => [
- ['host' => '127.0.0.1', 'port' => 9502],
- ],
- ],
- ],
- ];
|