-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed useless code from config-center.
- Loading branch information
1 parent
a52c6a7
commit 1fa12a2
Showing
5 changed files
with
1 addition
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,48 +9,13 @@ | |
* @contact [email protected] | ||
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE | ||
*/ | ||
use Hyperf\ConfigApollo\PullMode; | ||
use Hyperf\ConfigCenter\Mode; | ||
|
||
return [ | ||
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true), | ||
'driver' => env('CONFIG_CENTER_DRIVER', 'aliyun_acm'), | ||
'mode' => env('CONFIG_CENTER_MODE', Mode::PROCESS), | ||
'drivers' => [ | ||
'apollo' => [ | ||
'driver' => Hyperf\ConfigApollo\ApolloDriver::class, | ||
'pull_mode' => PullMode::INTERVAL, | ||
'server' => 'http://127.0.0.1:9080', | ||
'appid' => 'test', | ||
'cluster' => 'default', | ||
'namespaces' => [ | ||
'application', | ||
], | ||
'interval' => 5, | ||
'strict_mode' => false, | ||
'client_ip' => current(swoole_get_local_ip()), | ||
'pullTimeout' => 10, | ||
'interval_timeout' => 1, | ||
], | ||
'nacos' => [ | ||
'driver' => Hyperf\ConfigNacos\NacosDriver::class, | ||
'merge_mode' => Hyperf\ConfigNacos\Constants::CONFIG_MERGE_OVERWRITE, | ||
'interval' => 3, | ||
'default_key' => 'nacos_config', | ||
'listener_config' => [ | ||
// dataId, group, tenant, type, content | ||
'nacos_config' => [ | ||
'tenant' => 'tenant', // corresponding with service.namespaceId | ||
'data_id' => 'hyperf-service-config', | ||
'group' => 'DEFAULT_GROUP', | ||
], | ||
'nacos_config.data' => [ | ||
'data_id' => 'hyperf-service-config-yml', | ||
'group' => 'DEFAULT_GROUP', | ||
'type' => 'yml', | ||
], | ||
], | ||
], | ||
'aliyun_acm' => [ | ||
'driver' => Hyperf\ConfigAliyunAcm\AliyunAcmDriver::class, | ||
'interval' => 5, | ||
|
@@ -62,23 +27,5 @@ | |
'secret_key' => env('ALIYUN_ACM_SK', ''), | ||
'ecs_ram_role' => env('ALIYUN_ACM_RAM_ROLE', ''), | ||
], | ||
'etcd' => [ | ||
'driver' => Hyperf\ConfigEtcd\EtcdDriver::class, | ||
'packer' => Hyperf\Utils\Packer\JsonPacker::class, | ||
'namespaces' => [ | ||
'/application', | ||
], | ||
'mapping' => [ | ||
// etcd key => config key | ||
'/application/test' => 'test', | ||
], | ||
'interval' => 5, | ||
], | ||
'zookeeper' => [ | ||
'driver' => Hyperf\ConfigZookeeper\ZookeeperDriver::class, | ||
'server' => env('ZOOKEEPER_SERVER', '127.0.0.1:2181'), | ||
'path' => env('ZOOKEEPER_CONFIG_PATH', '/conf'), | ||
'interval' => 5, | ||
], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,59 +9,13 @@ | |
* @contact [email protected] | ||
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE | ||
*/ | ||
use Hyperf\ConfigApollo\PullMode; | ||
use Hyperf\ConfigCenter\Mode; | ||
|
||
return [ | ||
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true), | ||
'driver' => env('CONFIG_CENTER_DRIVER', 'etcd'), | ||
'mode' => env('CONFIG_CENTER_MODE', Mode::PROCESS), | ||
'drivers' => [ | ||
'apollo' => [ | ||
'driver' => Hyperf\ConfigApollo\ApolloDriver::class, | ||
'pull_mode' => PullMode::INTERVAL, | ||
'server' => 'http://127.0.0.1:9080', | ||
'appid' => 'test', | ||
'cluster' => 'default', | ||
'namespaces' => [ | ||
'application', | ||
], | ||
'interval' => 5, | ||
'strict_mode' => false, | ||
'client_ip' => current(swoole_get_local_ip()), | ||
'pullTimeout' => 10, | ||
'interval_timeout' => 1, | ||
], | ||
'nacos' => [ | ||
'driver' => Hyperf\ConfigNacos\NacosDriver::class, | ||
'merge_mode' => Hyperf\ConfigNacos\Constants::CONFIG_MERGE_OVERWRITE, | ||
'interval' => 3, | ||
'default_key' => 'nacos_config', | ||
'listener_config' => [ | ||
// dataId, group, tenant, type, content | ||
'nacos_config' => [ | ||
'tenant' => 'tenant', // corresponding with service.namespaceId | ||
'data_id' => 'hyperf-service-config', | ||
'group' => 'DEFAULT_GROUP', | ||
], | ||
'nacos_config.data' => [ | ||
'data_id' => 'hyperf-service-config-yml', | ||
'group' => 'DEFAULT_GROUP', | ||
'type' => 'yml', | ||
], | ||
], | ||
], | ||
'aliyun_acm' => [ | ||
'driver' => Hyperf\ConfigAliyunAcm\AliyunAcmDriver::class, | ||
'interval' => 5, | ||
'endpoint' => env('ALIYUN_ACM_ENDPOINT', 'acm.aliyun.com'), | ||
'namespace' => env('ALIYUN_ACM_NAMESPACE', ''), | ||
'data_id' => env('ALIYUN_ACM_DATA_ID', ''), | ||
'group' => env('ALIYUN_ACM_GROUP', 'DEFAULT_GROUP'), | ||
'access_key' => env('ALIYUN_ACM_AK', ''), | ||
'secret_key' => env('ALIYUN_ACM_SK', ''), | ||
'ecs_ram_role' => env('ALIYUN_ACM_RAM_ROLE', ''), | ||
], | ||
'etcd' => [ | ||
'driver' => Hyperf\ConfigEtcd\EtcdDriver::class, | ||
'packer' => Hyperf\Utils\Packer\JsonPacker::class, | ||
|
@@ -74,11 +28,5 @@ | |
], | ||
'interval' => 5, | ||
], | ||
'zookeeper' => [ | ||
'driver' => Hyperf\ConfigZookeeper\ZookeeperDriver::class, | ||
'server' => env('ZOOKEEPER_SERVER', '127.0.0.1:2181'), | ||
'path' => env('ZOOKEEPER_CONFIG_PATH', '/conf'), | ||
'interval' => 5, | ||
], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,29 +9,13 @@ | |
* @contact [email protected] | ||
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE | ||
*/ | ||
use Hyperf\ConfigApollo\PullMode; | ||
use Hyperf\ConfigCenter\Mode; | ||
|
||
return [ | ||
'enable' => (bool) env('CONFIG_CENTER_ENABLE', true), | ||
'driver' => env('CONFIG_CENTER_DRIVER', 'nacos'), | ||
'mode' => env('CONFIG_CENTER_MODE', Mode::PROCESS), | ||
'drivers' => [ | ||
'apollo' => [ | ||
'driver' => Hyperf\ConfigApollo\ApolloDriver::class, | ||
'pull_mode' => PullMode::INTERVAL, | ||
'server' => 'http://127.0.0.1:9080', | ||
'appid' => 'test', | ||
'cluster' => 'default', | ||
'namespaces' => [ | ||
'application', | ||
], | ||
'interval' => 5, | ||
'strict_mode' => false, | ||
'client_ip' => current(swoole_get_local_ip()), | ||
'pullTimeout' => 10, | ||
'interval_timeout' => 1, | ||
], | ||
'nacos' => [ | ||
'driver' => Hyperf\ConfigNacos\NacosDriver::class, | ||
'merge_mode' => Hyperf\ConfigNacos\Constants::CONFIG_MERGE_OVERWRITE, | ||
|
@@ -51,34 +35,5 @@ | |
], | ||
], | ||
], | ||
'aliyun_acm' => [ | ||
'driver' => Hyperf\ConfigAliyunAcm\AliyunAcmDriver::class, | ||
'interval' => 5, | ||
'endpoint' => env('ALIYUN_ACM_ENDPOINT', 'acm.aliyun.com'), | ||
'namespace' => env('ALIYUN_ACM_NAMESPACE', ''), | ||
'data_id' => env('ALIYUN_ACM_DATA_ID', ''), | ||
'group' => env('ALIYUN_ACM_GROUP', 'DEFAULT_GROUP'), | ||
'access_key' => env('ALIYUN_ACM_AK', ''), | ||
'secret_key' => env('ALIYUN_ACM_SK', ''), | ||
'ecs_ram_role' => env('ALIYUN_ACM_RAM_ROLE', ''), | ||
], | ||
'etcd' => [ | ||
'driver' => Hyperf\ConfigEtcd\EtcdDriver::class, | ||
'packer' => Hyperf\Utils\Packer\JsonPacker::class, | ||
'namespaces' => [ | ||
'/application', | ||
], | ||
'mapping' => [ | ||
// etcd key => config key | ||
'/application/test' => 'test', | ||
], | ||
'interval' => 5, | ||
], | ||
'zookeeper' => [ | ||
'driver' => Hyperf\ConfigZookeeper\ZookeeperDriver::class, | ||
'server' => env('ZOOKEEPER_SERVER', '127.0.0.1:2181'), | ||
'path' => env('ZOOKEEPER_CONFIG_PATH', '/conf'), | ||
'interval' => 5, | ||
], | ||
], | ||
]; |