friendsofhyperf / config-consul
The consul config component for Hyperf.
v3.2.0
2026-06-07 13:32 UTC
Requires
- hyperf/codec: ~3.2.0
- hyperf/config-center: ~3.2.0
- hyperf/consul: ~3.2.0
- hyperf/stringable: ~3.2.0
This package is auto-updated.
Last update: 2026-06-07 13:48:11 UTC
README
The consul config component for Hyperf.
Installation
composer require friendsofhyperf/config-consul
Configure
// config/autoload/config_center.php return [ 'drivers' => [ 'consul' => [ 'driver' => FriendsOfHyperf\ConfigConsul\ConsulDriver::class, 'packer' => Hyperf\Codec\Packer\JsonPacker::class, 'client' => [ 'uri' => env('CONSUL_URI'), 'token' => env('CONSUL_TOKEN'), ], 'namespaces' => [ '/application', ], 'mapping' => [ // consul key => config key '/application/test' => 'test', ], 'interval' => 5, ], ], ];