变更
This commit is contained in:
+4
-2
@@ -29,8 +29,8 @@ class RpcManager extends Component
|
|||||||
* @return void
|
* @return void
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function reRegister(string $serviceName)
|
public function reRegister(string $serviceName): void
|
||||||
{
|
{
|
||||||
$config = $this->_rpc[$serviceName] ?? [];
|
$config = $this->_rpc[$serviceName] ?? [];
|
||||||
if (empty($config)) {
|
if (empty($config)) {
|
||||||
return;
|
return;
|
||||||
@@ -90,6 +90,8 @@ class RpcManager extends Component
|
|||||||
$this->_rpc[$name] = ['id' => $serviceConfig['ID'], 'config' => $serviceConfig];
|
$this->_rpc[$name] = ['id' => $serviceConfig['ID'], 'config' => $serviceConfig];
|
||||||
}
|
}
|
||||||
Router::addServer('rpc', static function () use ($name, $class) {
|
Router::addServer('rpc', static function () use ($name, $class) {
|
||||||
|
|
||||||
|
var_dump($name, $class);
|
||||||
Router::get($name, $class);
|
Router::get($name, $class);
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user