0
7
Login
Code
Issues
Pull requests
Events
Packages
e42ace67d73e6d4c90241d3baeeb8a7682626824
e42ace67d73e6d4c90241d3baeeb8a7682626824

config-consul

Latest Stable Version Total Downloads License

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,
        ],
    ],
];

Donate

If you like them, Buy me a cup of coffee.

AlipayWeChat

Contact

License

MIT