czan / config-consul
Config extension for Hyperf.
1.1
2022-03-21 08:00 UTC
Requires
- php: >=7.4
- hyperf/config-center: 3.0.*
- hyperf/consul: 3.0.*
- hyperf/utils: 3.0.*
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- hyperf/di: 3.0.*
- hyperf/process: 3.0.*
- phpstan/phpstan: ^1.0
- swoole/ide-helper: dev-master
This package is not auto-updated.
Last update: 2025-03-10 23:05:48 UTC
README
Installation
composer require czan/config-consul
Configure
// config/autoload/config_center.php return [ 'drivers' => [ 'consul' => [ 'driver' => Czan\ConfigConsul\ConsulDriver::class, 'packer' => Hyperf\Utils\Packer\JsonPacker::class, 'uri' => env('CONSUL_URI'), 'namespaces' => [ '/application', ], 'mapping' => [ // consul key => config key '/application/test' => 'test', ], 'interval' => 5, ], ], ];