From d2db326ecfe448544fddf754b33a1400ffbb5410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 23 Mar 2021 15:13:33 +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/Rpc/Consumer.php | 47 ++++++++++++++++++++++++++++ Annotation/Rpc/RpcService.php | 58 +++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 Annotation/Rpc/Consumer.php create mode 100644 Annotation/Rpc/RpcService.php diff --git a/Annotation/Rpc/Consumer.php b/Annotation/Rpc/Consumer.php new file mode 100644 index 00000000..301beb97 --- /dev/null +++ b/Annotation/Rpc/Consumer.php @@ -0,0 +1,47 @@ +getRpc(); + $rpc->addConsumer($this->cmd, $handler); + return parent::execute($handler); // TODO: Change the autogenerated stub + } + + +} diff --git a/Annotation/Rpc/RpcService.php b/Annotation/Rpc/RpcService.php new file mode 100644 index 00000000..f8bca780 --- /dev/null +++ b/Annotation/Rpc/RpcService.php @@ -0,0 +1,58 @@ +getRpc(); + $rpc->addProducer($this->cmd, $handler, [ + 'host' => $this->host, + 'port' => $this->port, + 'mode' => $this->mode + ]); + return parent::execute($handler); // TODO: Change the autogenerated stub + } + + +}