Skip to content

Commit 1fa12a2

Browse files
committed
Removed useless code from config-center.
1 parent a52c6a7 commit 1fa12a2

File tree

5 files changed

+1
-199
lines changed

5 files changed

+1
-199
lines changed

installer/OptionalPackages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function installHyperfScript()
128128
implode('', $ask),
129129
function ($value) {
130130
if ($value === 'y' || $value === 'yes') {
131-
throw new \InvalidArgumentException("You should type a time zone name, like Asia/Shanghai. Or type n to skip.");
131+
throw new \InvalidArgumentException('You should type a time zone name, like Asia/Shanghai. Or type n to skip.');
132132
}
133133

134134
return $value;

installer/resources/config_center/config_acm.php

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -9,48 +9,13 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12-
use Hyperf\ConfigApollo\PullMode;
1312
use Hyperf\ConfigCenter\Mode;
1413

1514
return [
1615
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
1716
'driver' => env('CONFIG_CENTER_DRIVER', 'aliyun_acm'),
1817
'mode' => env('CONFIG_CENTER_MODE', Mode::PROCESS),
1918
'drivers' => [
20-
'apollo' => [
21-
'driver' => Hyperf\ConfigApollo\ApolloDriver::class,
22-
'pull_mode' => PullMode::INTERVAL,
23-
'server' => 'http://127.0.0.1:9080',
24-
'appid' => 'test',
25-
'cluster' => 'default',
26-
'namespaces' => [
27-
'application',
28-
],
29-
'interval' => 5,
30-
'strict_mode' => false,
31-
'client_ip' => current(swoole_get_local_ip()),
32-
'pullTimeout' => 10,
33-
'interval_timeout' => 1,
34-
],
35-
'nacos' => [
36-
'driver' => Hyperf\ConfigNacos\NacosDriver::class,
37-
'merge_mode' => Hyperf\ConfigNacos\Constants::CONFIG_MERGE_OVERWRITE,
38-
'interval' => 3,
39-
'default_key' => 'nacos_config',
40-
'listener_config' => [
41-
// dataId, group, tenant, type, content
42-
'nacos_config' => [
43-
'tenant' => 'tenant', // corresponding with service.namespaceId
44-
'data_id' => 'hyperf-service-config',
45-
'group' => 'DEFAULT_GROUP',
46-
],
47-
'nacos_config.data' => [
48-
'data_id' => 'hyperf-service-config-yml',
49-
'group' => 'DEFAULT_GROUP',
50-
'type' => 'yml',
51-
],
52-
],
53-
],
5419
'aliyun_acm' => [
5520
'driver' => Hyperf\ConfigAliyunAcm\AliyunAcmDriver::class,
5621
'interval' => 5,
@@ -62,23 +27,5 @@
6227
'secret_key' => env('ALIYUN_ACM_SK', ''),
6328
'ecs_ram_role' => env('ALIYUN_ACM_RAM_ROLE', ''),
6429
],
65-
'etcd' => [
66-
'driver' => Hyperf\ConfigEtcd\EtcdDriver::class,
67-
'packer' => Hyperf\Utils\Packer\JsonPacker::class,
68-
'namespaces' => [
69-
'/application',
70-
],
71-
'mapping' => [
72-
// etcd key => config key
73-
'/application/test' => 'test',
74-
],
75-
'interval' => 5,
76-
],
77-
'zookeeper' => [
78-
'driver' => Hyperf\ConfigZookeeper\ZookeeperDriver::class,
79-
'server' => env('ZOOKEEPER_SERVER', '127.0.0.1:2181'),
80-
'path' => env('ZOOKEEPER_CONFIG_PATH', '/conf'),
81-
'interval' => 5,
82-
],
8330
],
8431
];

installer/resources/config_center/config_apollo.php

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -32,53 +32,5 @@
3232
'pullTimeout' => 10,
3333
'interval_timeout' => 1,
3434
],
35-
'nacos' => [
36-
'driver' => Hyperf\ConfigNacos\NacosDriver::class,
37-
'merge_mode' => Hyperf\ConfigNacos\Constants::CONFIG_MERGE_OVERWRITE,
38-
'interval' => 3,
39-
'default_key' => 'nacos_config',
40-
'listener_config' => [
41-
// dataId, group, tenant, type, content
42-
'nacos_config' => [
43-
'tenant' => 'tenant', // corresponding with service.namespaceId
44-
'data_id' => 'hyperf-service-config',
45-
'group' => 'DEFAULT_GROUP',
46-
],
47-
'nacos_config.data' => [
48-
'data_id' => 'hyperf-service-config-yml',
49-
'group' => 'DEFAULT_GROUP',
50-
'type' => 'yml',
51-
],
52-
],
53-
],
54-
'aliyun_acm' => [
55-
'driver' => Hyperf\ConfigAliyunAcm\AliyunAcmDriver::class,
56-
'interval' => 5,
57-
'endpoint' => env('ALIYUN_ACM_ENDPOINT', 'acm.aliyun.com'),
58-
'namespace' => env('ALIYUN_ACM_NAMESPACE', ''),
59-
'data_id' => env('ALIYUN_ACM_DATA_ID', ''),
60-
'group' => env('ALIYUN_ACM_GROUP', 'DEFAULT_GROUP'),
61-
'access_key' => env('ALIYUN_ACM_AK', ''),
62-
'secret_key' => env('ALIYUN_ACM_SK', ''),
63-
'ecs_ram_role' => env('ALIYUN_ACM_RAM_ROLE', ''),
64-
],
65-
'etcd' => [
66-
'driver' => Hyperf\ConfigEtcd\EtcdDriver::class,
67-
'packer' => Hyperf\Utils\Packer\JsonPacker::class,
68-
'namespaces' => [
69-
'/application',
70-
],
71-
'mapping' => [
72-
// etcd key => config key
73-
'/application/test' => 'test',
74-
],
75-
'interval' => 5,
76-
],
77-
'zookeeper' => [
78-
'driver' => Hyperf\ConfigZookeeper\ZookeeperDriver::class,
79-
'server' => env('ZOOKEEPER_SERVER', '127.0.0.1:2181'),
80-
'path' => env('ZOOKEEPER_CONFIG_PATH', '/conf'),
81-
'interval' => 5,
82-
],
8335
],
8436
];

installer/resources/config_center/config_etcd.php

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -9,59 +9,13 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12-
use Hyperf\ConfigApollo\PullMode;
1312
use Hyperf\ConfigCenter\Mode;
1413

1514
return [
1615
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
1716
'driver' => env('CONFIG_CENTER_DRIVER', 'etcd'),
1817
'mode' => env('CONFIG_CENTER_MODE', Mode::PROCESS),
1918
'drivers' => [
20-
'apollo' => [
21-
'driver' => Hyperf\ConfigApollo\ApolloDriver::class,
22-
'pull_mode' => PullMode::INTERVAL,
23-
'server' => 'http://127.0.0.1:9080',
24-
'appid' => 'test',
25-
'cluster' => 'default',
26-
'namespaces' => [
27-
'application',
28-
],
29-
'interval' => 5,
30-
'strict_mode' => false,
31-
'client_ip' => current(swoole_get_local_ip()),
32-
'pullTimeout' => 10,
33-
'interval_timeout' => 1,
34-
],
35-
'nacos' => [
36-
'driver' => Hyperf\ConfigNacos\NacosDriver::class,
37-
'merge_mode' => Hyperf\ConfigNacos\Constants::CONFIG_MERGE_OVERWRITE,
38-
'interval' => 3,
39-
'default_key' => 'nacos_config',
40-
'listener_config' => [
41-
// dataId, group, tenant, type, content
42-
'nacos_config' => [
43-
'tenant' => 'tenant', // corresponding with service.namespaceId
44-
'data_id' => 'hyperf-service-config',
45-
'group' => 'DEFAULT_GROUP',
46-
],
47-
'nacos_config.data' => [
48-
'data_id' => 'hyperf-service-config-yml',
49-
'group' => 'DEFAULT_GROUP',
50-
'type' => 'yml',
51-
],
52-
],
53-
],
54-
'aliyun_acm' => [
55-
'driver' => Hyperf\ConfigAliyunAcm\AliyunAcmDriver::class,
56-
'interval' => 5,
57-
'endpoint' => env('ALIYUN_ACM_ENDPOINT', 'acm.aliyun.com'),
58-
'namespace' => env('ALIYUN_ACM_NAMESPACE', ''),
59-
'data_id' => env('ALIYUN_ACM_DATA_ID', ''),
60-
'group' => env('ALIYUN_ACM_GROUP', 'DEFAULT_GROUP'),
61-
'access_key' => env('ALIYUN_ACM_AK', ''),
62-
'secret_key' => env('ALIYUN_ACM_SK', ''),
63-
'ecs_ram_role' => env('ALIYUN_ACM_RAM_ROLE', ''),
64-
],
6519
'etcd' => [
6620
'driver' => Hyperf\ConfigEtcd\EtcdDriver::class,
6721
'packer' => Hyperf\Utils\Packer\JsonPacker::class,
@@ -74,11 +28,5 @@
7428
],
7529
'interval' => 5,
7630
],
77-
'zookeeper' => [
78-
'driver' => Hyperf\ConfigZookeeper\ZookeeperDriver::class,
79-
'server' => env('ZOOKEEPER_SERVER', '127.0.0.1:2181'),
80-
'path' => env('ZOOKEEPER_CONFIG_PATH', '/conf'),
81-
'interval' => 5,
82-
],
8331
],
8432
];

installer/resources/config_center/config_nacos.php

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,13 @@
99
* @contact [email protected]
1010
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
1111
*/
12-
use Hyperf\ConfigApollo\PullMode;
1312
use Hyperf\ConfigCenter\Mode;
1413

1514
return [
1615
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true),
1716
'driver' => env('CONFIG_CENTER_DRIVER', 'nacos'),
1817
'mode' => env('CONFIG_CENTER_MODE', Mode::PROCESS),
1918
'drivers' => [
20-
'apollo' => [
21-
'driver' => Hyperf\ConfigApollo\ApolloDriver::class,
22-
'pull_mode' => PullMode::INTERVAL,
23-
'server' => 'http://127.0.0.1:9080',
24-
'appid' => 'test',
25-
'cluster' => 'default',
26-
'namespaces' => [
27-
'application',
28-
],
29-
'interval' => 5,
30-
'strict_mode' => false,
31-
'client_ip' => current(swoole_get_local_ip()),
32-
'pullTimeout' => 10,
33-
'interval_timeout' => 1,
34-
],
3519
'nacos' => [
3620
'driver' => Hyperf\ConfigNacos\NacosDriver::class,
3721
'merge_mode' => Hyperf\ConfigNacos\Constants::CONFIG_MERGE_OVERWRITE,
@@ -51,34 +35,5 @@
5135
],
5236
],
5337
],
54-
'aliyun_acm' => [
55-
'driver' => Hyperf\ConfigAliyunAcm\AliyunAcmDriver::class,
56-
'interval' => 5,
57-
'endpoint' => env('ALIYUN_ACM_ENDPOINT', 'acm.aliyun.com'),
58-
'namespace' => env('ALIYUN_ACM_NAMESPACE', ''),
59-
'data_id' => env('ALIYUN_ACM_DATA_ID', ''),
60-
'group' => env('ALIYUN_ACM_GROUP', 'DEFAULT_GROUP'),
61-
'access_key' => env('ALIYUN_ACM_AK', ''),
62-
'secret_key' => env('ALIYUN_ACM_SK', ''),
63-
'ecs_ram_role' => env('ALIYUN_ACM_RAM_ROLE', ''),
64-
],
65-
'etcd' => [
66-
'driver' => Hyperf\ConfigEtcd\EtcdDriver::class,
67-
'packer' => Hyperf\Utils\Packer\JsonPacker::class,
68-
'namespaces' => [
69-
'/application',
70-
],
71-
'mapping' => [
72-
// etcd key => config key
73-
'/application/test' => 'test',
74-
],
75-
'interval' => 5,
76-
],
77-
'zookeeper' => [
78-
'driver' => Hyperf\ConfigZookeeper\ZookeeperDriver::class,
79-
'server' => env('ZOOKEEPER_SERVER', '127.0.0.1:2181'),
80-
'path' => env('ZOOKEEPER_CONFIG_PATH', '/conf'),
81-
'interval' => 5,
82-
],
8338
],
8439
];

0 commit comments

Comments
 (0)