改名
This commit is contained in:
+4
-20
@@ -70,26 +70,10 @@ class RpcJsonp extends Component implements OnConnectInterface, OnReceiveInterfa
|
|||||||
$config = Config::get('rpc');
|
$config = Config::get('rpc');
|
||||||
|
|
||||||
$agent = Kiri::getDi()->get(Agent::class);
|
$agent = Kiri::getDi()->get(Agent::class);
|
||||||
$data = $agent->service->register([
|
$data = $agent->service->register($config['registry']['config']);
|
||||||
"ID" => $config['name'] ?? 'test-name',
|
if ($data->getStatusCode() != 200) {
|
||||||
"Name" => "redis",
|
exit($data->getBody()->getContents());
|
||||||
"Tags" => ["primary", "v1"],
|
}
|
||||||
"Address" => Kiri::localhost(),
|
|
||||||
"Port" => $config['port'],
|
|
||||||
"Meta" => [
|
|
||||||
"redis_version" => "4.0"
|
|
||||||
],
|
|
||||||
"EnableTagOverride" => false,
|
|
||||||
"Check" => [
|
|
||||||
"Http" => "http://127.0.0.1:9527",
|
|
||||||
"Interval" => "1s"
|
|
||||||
],
|
|
||||||
"Weights" => [
|
|
||||||
"Passing" => 10,
|
|
||||||
"Warning" => 1
|
|
||||||
]
|
|
||||||
]);
|
|
||||||
var_dump($data->getBody()->getContents());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user