wzy-wangge/laravel-consul

laravel连接consul获取健康服务

Maintainers

Package info

github.com/wzy-wangge/laravel-consul

pkg:composer/wzy-wangge/laravel-consul

Statistics

Installs: 8

Dependents: 0

Suggesters: 0

Stars: 0

0.0.4 2021-03-29 03:17 UTC

This package is auto-updated.

Last update: 2026-03-01 00:34:55 UTC


README

Quickstart

composer require wzy-wangge/laravel-consul

Add to providers in config/app.php:

Wzy\LaravelConsul\ConsulServiceProvider::class,

To your .env add these variables and set them to your liking:

CONSUL_AGENT_HOST=localhost
CONSUL_AGENT_PORT=8500

复制 config/consul.php 到你的config下、否则运行会有异常

Usage

Currently supports only the retrieving of healthy instances:

Consul::getHealthClient()->getHealthyServicesInstances('name-of-service')