hyperf / nacos
Nacos SDK
Fund package maintenance!
Open Collective
hyperf.wiki/#/zh-cn/donate
Installs: 283 868
Dependents: 13
Suggesters: 1
Security: 0
Stars: 22
Watchers: 6
Forks: 14
Open Issues: 5
Requires
- php: >=8.1
- guzzlehttp/guzzle: ^6.5 || ^7.0
- hyperf/codec: ~3.1.0
- hyperf/contract: ~3.1.0
- hyperf/support: ~3.1.0
- hyperf/utils: ~3.1.0
- jetbrains/phpstorm-attributes: ^1.0
- 3.1.x-dev
- dev-master / 3.1.x-dev
- v3.1.42
- v3.1.27.1
- v3.1.27
- v3.1.15
- v3.1.12
- v3.1.7
- v3.1.1
- v3.1.0
- v3.1.0-rc.4
- v3.1.0-beta.7
- v3.1.0-beta.6
- v3.1.0-beta.3
- v3.1.0-alpha.1
- 3.0.x-dev
- v3.0.37
- v3.0.29
- v3.0.28
- v3.0.23
- v3.0.18
- v3.0.16
- v3.0.15
- v3.0.12
- v3.0.7
- v3.0.3
- v3.0.0
- v3.0.0-rc.1
- v3.0.0-beta.1
- v3.0.0-alpha.1
- 2.2.x-dev
- v2.2.33
- v2.2.17
- v2.2.11
- v2.2.10
- v2.2.4
- v2.2.3
- v2.2.2
- v2.2.0
- v2.2.0-rc3
- v2.2.0-rc2
- v2.2.0-beta1
- 2.1.x-dev
- v2.1.11
- v2.1.5
- v2.1.0
- v2.1.0-beta1
- 2.0.x-dev
- v2.0.23
- v2.0.20
- v2.0.13
- v2.0.12
- v2.0.9
- v2.0.7
- v2.0.6
- v2.0.4
- v2.0.1
- v2.0.0
This package is auto-updated.
Last update: 2024-10-25 03:36:14 UTC
README
安装
composer require hyperf/nacos
使用
<?php use Hyperf\Nacos\Application; use Hyperf\Nacos\Config; use Hyperf\Codec\Json; $application = new Application(new Config([ 'username' => 'nacos', 'password' => 'nacos', 'guzzle_config' => [ 'headers' => [ 'charset' => 'UTF-8', ], ], ])); $response = $application->auth->login('nacos', 'nacos'); $result = Json::decode((string) $response->getBody()); $response = $application->config->get('hyperf-service-config', 'DEFAULT_GROUP'); $result = Json::decode((string) $response->getBody());