Download the PHP package caiyun/micro without Composer
On this page you can find all versions of the php package caiyun/micro. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor caiyun
Package micro
Short Description Laravel microservice toolkit with pluggable service discovery and registration (Nacos, Consul, Etcd, Zookeeper, Polaris, static, log).
License MIT
Homepage https://github.com/763606865/caiyun-micro
Package micro
Short Description Laravel microservice toolkit with pluggable service discovery and registration (Nacos, Consul, Etcd, Zookeeper, Polaris, static, log).
License MIT
Homepage https://github.com/763606865/caiyun-micro
Please rate this library. Is it a good library?
Informations about the package micro
Caiyun Micro
适用于 PHP 8.3+、Laravel 13.x 的微服务基础设施包,提供可插拔的服务发现与服务注册:
static:本地/测试用固定 endpointsnacos:Nacos Open API(发现、注册、注销、心跳)consul:Consul HTTP API(TTL Check 心跳)etcd:etcd v3 HTTP/JSON API(Lease 保活)zookeeper:ZooKeeper(需ext-zookeeper,节点心跳时间戳)polaris:PolarisMesh / 北极星 SDK HTTP API(Discover / Register / Heartbeat)log:仅记录日志,便于本地调试
业务侧通过服务别名调用下游,例如 Micro::for('agent')->post(...),无需关心实例 IP。
安装
发布配置:
使用 Zookeeper 驱动时需安装 PECL 扩展:
快速配置
将 MICRO_DRIVER 设为 nacos / consul / etcd / zookeeper / polaris 即可切换注册中心。
static 驱动请在 config/micro.php 中配置 endpoints:
用法
服务发现 + HTTP 调用
手动发现
服务注册 / 心跳 / 注销
或代码中:
生产环境可将 MICRO_AUTO_REGISTER=true,并配合调度周期性执行 micro:heartbeat(临时实例 / TTL / Lease 需要心跳保活)。
建议在 routes/console.php 或 Scheduler 中:
负载均衡
MICRO_LOAD_BALANCER 支持:
random(默认)round_robinweighted_random
扩展 Driver
开发
All versions of micro with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.3
ext-json Version *
guzzlehttp/guzzle Version ^7.0
illuminate/cache Version ^13.0
illuminate/console Version ^13.0
illuminate/contracts Version ^13.0
illuminate/http Version ^13.0
illuminate/log Version ^13.0
illuminate/support Version ^13.0
ext-json Version *
guzzlehttp/guzzle Version ^7.0
illuminate/cache Version ^13.0
illuminate/console Version ^13.0
illuminate/contracts Version ^13.0
illuminate/http Version ^13.0
illuminate/log Version ^13.0
illuminate/support Version ^13.0
The package caiyun/micro contains the following files
Loading the files please wait ...