Revert "DataService契约按实际提供方修正,拆分Course/Exam服务契约并补消费者配置"

This reverts commit 64a5645e60.
This commit is contained in:
堂吉诃德拉曼查的英豪
2026-08-06 09:37:22 +08:00
parent 64a5645e60
commit 6fa83dd193
6 changed files with 12 additions and 88 deletions

View File

@@ -1,44 +0,0 @@
<?php
/**
* 课程服务
*/
use Dhd\Micro\Interface\CourseService\CourseServiceInterface;
use function Hyperf\Support\env;
return [
// 对应消费者类的 $serviceName
'name' => 'CourseService',
// 服务接口名
'service' => CourseServiceInterface::class,
// 服务提供者的服务协议,可选,默认值为 jsonrpc-http
'protocol' => 'jsonrpc-http',
// 负载均衡算法,可选,默认值为 random
'load_balancer' => 'random',
// 这个消费者要从哪个服务中心获取节点信息,如不配置则不会从服务中心获取节点信息
'registry' => [
'protocol' => env('CONSUMERS_PROTOCOL', 'consul'),
'address' => env('CONSUMERS_ADDRESS', 'http://127.0.0.1:8500'),
],
// 配置项,会影响到 Packer 和 Transporter
'options' => [
'connect_timeout' => 5.0,
'recv_timeout' => 5.0,
'settings' => [
'open_eof_split' => true,
'package_eof' => "\r\n",
],
'retry_count' => 2,
'retry_interval' => 100,
'heartbeat' => 30,
'pool' => [
'min_connections' => 1,
'max_connections' => 32,
'connect_timeout' => 10.0,
'wait_timeout' => 3.0,
'heartbeat' => -1,
'max_idle_time' => 60.0,
],
],
];

View File

@@ -1,40 +0,0 @@
<?php
use Dhd\Micro\Interface\ExamService\ExamServiceInterface;
use function Hyperf\Support\env;
return [
// 对应消费者类的 $serviceName
'name' => 'ExamService',
// 服务接口名
'service' => ExamServiceInterface::class,
// 服务提供者的服务协议,可选,默认值为 jsonrpc-http
'protocol' => 'jsonrpc-http',
// 负载均衡算法,可选,默认值为 random
'load_balancer' => 'random',
// 这个消费者要从哪个服务中心获取节点信息,如不配置则不会从服务中心获取节点信息
'registry' => [
'protocol' => env('CONSUMERS_PROTOCOL', 'consul'),
'address' => env('CONSUMERS_ADDRESS', 'http://127.0.0.1:8500'),
],
// 配置项,会影响到 Packer 和 Transporter
'options' => [
'connect_timeout' => 5.0,
'recv_timeout' => 5.0,
'settings' => [
'open_eof_split' => true,
'package_eof' => "\r\n",
],
'retry_count' => 2,
'retry_interval' => 100,
'heartbeat' => 30,
'pool' => [
'min_connections' => 1,
'max_connections' => 32,
'connect_timeout' => 10.0,
'wait_timeout' => 3.0,
'heartbeat' => -1,
'max_idle_time' => 60.0,
],
],
];