personali / laravel-consul
An optional laravel 5 package for querying consul agents
Installs: 2 943
Dependents: 0
Suggesters: 0
Security: 0
Stars: 12
Watchers: 4
Forks: 2
Open Issues: 1
Requires
- guzzlehttp/guzzle: ^6.2
This package is not auto-updated.
Last update: 2024-11-11 19:21:42 UTC
README
Quickstart
composer require personali/laravel-consul
Add to providers
in config/app.php
:
Personali\LaravelConsul\ConsulServiceProvider::class,
Add to aliases
in config/app.php
:
'Consul' => Personali\LaravelConsul\ConsulFacade::class,
To your .env
add these variables and set them to your liking:
CONSUL_AGENT_HOST=localhost
CONSUL_AGENT_PORT=8500
Copy config/consul.php to your config folder/
Usage
Currently supports only the retrieving of healthy instances:
Consul::getHealthClient()->getHealthyServicesInstances('name-of-service')