From 1eef6a7303c5474cdb058fa67294558df8124489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 12 Aug 2021 15:53:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Annotation/Route/RpcProducer.php | 57 -------------------------------- Annotation/Rpc/RpcClient.php | 55 ------------------------------ 2 files changed, 112 deletions(-) delete mode 100644 Annotation/Route/RpcProducer.php delete mode 100644 Annotation/Rpc/RpcClient.php diff --git a/Annotation/Route/RpcProducer.php b/Annotation/Route/RpcProducer.php deleted file mode 100644 index cf0bfd82..00000000 --- a/Annotation/Route/RpcProducer.php +++ /dev/null @@ -1,57 +0,0 @@ -getRouter(); - $cmd = $this->cmd; - $callback = function (Actuator $actuator) use ($cmd, $class, $method) { - $actuator->addListener($cmd, $class::class . '@' . $method); - }; - $router->addRpcService($this->port, $callback); - return $router; - } - - -} diff --git a/Annotation/Rpc/RpcClient.php b/Annotation/Rpc/RpcClient.php deleted file mode 100644 index cebec17c..00000000 --- a/Annotation/Rpc/RpcClient.php +++ /dev/null @@ -1,55 +0,0 @@ -config = ['port' => $port, 'mode' => $mode, 'timeout' => $timeout]; - } - - - /** - * @param mixed $class - * @param mixed $method - * @return bool - * @throws Exception - */ - public function execute(mixed $class, mixed $method = ''): bool - { - $rpc = Kiri::app()->getRpc(); - $rpc->addProducer($this->cmd, [$class, $method], $this->config); - - return true; - } - - -}