希望增加对 consul 支持
Closed this issue · 2 comments
huangdijia commented
$node = with(
(new Catalog(function () {
return new Client(['base_uri' => 'http://192.168.1.1:8500']);
}))
->service('CalculatorService')
->json(),
function ($nodes) {
$rand = array_rand($nodes, 1);
$node = $nodes[$rand];
return [
'host' => Arr::get($node, 'Address'),
'port' => Arr::get($node, 'ServicePort'),
];
});
return $node;
huangzhhui commented
欢迎 PR
huangdijia commented
欢迎 PR
已提交