Download the PHP package ibllex/hyperf-service-register without Composer
On this page you can find all versions of the php package ibllex/hyperf-service-register. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ibllex/hyperf-service-register
More information about ibllex/hyperf-service-register
Files in ibllex/hyperf-service-register
Package hyperf-service-register
Short Description Service registration component for hyperf
License MIT
Informations about the package hyperf-service-register
English | 中文
hyperf-service-register
This is a service registry component of hyperf that currently supports publishing services of the grpc, http, jsonrpc-http and jsonrpc protocol to consul.
We will support more service center in the future, like etcd, and you can also do it yourself and open a pull request, it's not difficult.
Quick usage
1. Install
2. Configure the services to publish
Edit config/autoload/server.php
and add the publish
option to the service you want to publish. just like this
The publish option requires at least two fields, protocol
and name
. You can also specify the id
field, which is generated automatically if not specified.
You must be aware that if your service is using the grpc
protocol, you must manually add a health check route to the service.
Edit your config/routes.php
and add
3. That's all.
License
This library is under the MIT license.
All versions of hyperf-service-register with dependencies
hyperf/consul Version ~2.0.0
hyperf/http-server Version ~2.0.0
hyperf/contract Version ~2.0.0