改名
This commit is contained in:
+4
-1
@@ -28,7 +28,9 @@ class RpcManager
|
|||||||
$methods = Kiri::getDi()->getReflect($class);
|
$methods = Kiri::getDi()->getReflect($class);
|
||||||
$lists = $methods->getMethods(\ReflectionMethod::IS_PUBLIC);
|
$lists = $methods->getMethods(\ReflectionMethod::IS_PUBLIC);
|
||||||
|
|
||||||
if (!isset($this->_rpc[$name])) $this->_rpc[$name] = ['methods' => [], 'id' => $serviceConfig['ID'], 'config' => $serviceConfig];
|
if (!isset($this->_rpc[$name])) {
|
||||||
|
$this->_rpc[$name] = ['methods' => [], 'id' => $serviceConfig['ID'], 'config' => $serviceConfig];
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($lists as $reflection) {
|
foreach ($lists as $reflection) {
|
||||||
$methodName = $reflection->getName();
|
$methodName = $reflection->getName();
|
||||||
@@ -59,6 +61,7 @@ class RpcManager
|
|||||||
{
|
{
|
||||||
$agent = Kiri::getDi()->get(Agent::class);
|
$agent = Kiri::getDi()->get(Agent::class);
|
||||||
foreach ($this->_rpc as $list) {
|
foreach ($this->_rpc as $list) {
|
||||||
|
var_dump($list);
|
||||||
$data = $agent->service->register($list['config']);
|
$data = $agent->service->register($list['config']);
|
||||||
if ($data->getStatusCode() != 200) {
|
if ($data->getStatusCode() != 200) {
|
||||||
exit($data->getBody()->getContents());
|
exit($data->getBody()->getContents());
|
||||||
|
|||||||
Reference in New Issue
Block a user