支持从consul获取注册的服务吗?
Closed this issue · 1 comments
CyberLife-Markus commented
这个组件支持注册绑定consul吗,我用hyperf提供了一个发送短信的jsonrpc服务,在现有的FPM项目内想使用jet组件.
看文档上写的创建时只有手动写服务名的ip与端口
ServiceManager::register($service = 'SmsAliyunService', $protocol = 'jsonrpc', [
ServiceManager::NODES => [
[$host = '127.0.0.1', $port = 9501],
],
]);
$clientFactory = new ClientFactory();
$client = $clientFactory->create($service = 'SmsAliyunService', $protocol = 'jsonrpc');
$client->send();
我想从consul里获取服务的IP与端口该怎么做呢
Observer5 commented
这个怎么配置呢?