services.php 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. return [
  3. 'consumers' => [
  4. [
  5. // 用戶中心
  6. 'name' => 'UserService',
  7. 'service' => \App\JsonRpc\UserServiceInterface::class,
  8. // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
  9. 'nodes' => [
  10. ['host' => '192.168.1.193', 'port' => 9504],
  11. ],
  12. ],
  13. [
  14. // 权限管理
  15. 'name' => 'AuthorityService',
  16. 'service' => \App\JsonRpc\AuthorityServiceInterface::class,
  17. // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
  18. 'nodes' => [
  19. ['host' => '192.168.1.193', 'port' =>
  20. 9504],
  21. ],
  22. ],
  23. [
  24. // 广告中心
  25. 'name' => 'AdService',
  26. 'service' => \App\JsonRpc\AdServiceInterface::class,
  27. // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
  28. 'nodes' => [
  29. ['host' => '192.168.1.193', 'port' => 9503],
  30. ],
  31. ],
  32. [
  33. //网站管理
  34. 'name' => 'WebsiteService',
  35. 'service' => \App\JsonRpc\WebsiteServiceInterface::class,
  36. // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
  37. 'nodes' => [
  38. ['host' => '192.168.1.193', 'port' => 9502],
  39. ],
  40. ],
  41. [
  42. //公共方法
  43. 'name' => 'PublicRpcService',
  44. 'service' => \App\JsonRpc\PublicRpcServiceInterface::class,
  45. // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
  46. 'nodes' => [
  47. ['host' => '192.168.1.193', 'port' => 9502],
  48. ],
  49. ],
  50. [
  51. //资讯-新闻
  52. 'name' => 'NewsService',
  53. 'service' => \App\JsonRpc\NewsServiceInterface::class,
  54. // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
  55. 'nodes' => [
  56. ['host' => '192.168.1.193', 'port' => 9505],
  57. ],
  58. ],
  59. [
  60. //友情链接服务
  61. 'name' => 'LinkService',
  62. 'service' => \App\JsonRpc\LinkServiceInterface::class,
  63. // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
  64. 'nodes' => [
  65. ['host' => '192.168.1.193', 'port' => 9502],
  66. ],
  67. ],
  68. [
  69. //友情链接服务
  70. 'name' => 'ChatService',
  71. 'service' => \App\JsonRpc\ChatServiceInterface::class,
  72. // 直接对指定的节点进行消费,通过下面的 nodes 参数来配置服务提供者的节点信息
  73. 'nodes' => [
  74. ['host' => '192.168.1.193', 'port' => 9507],
  75. ],
  76. ],
  77. ],
  78. ];