This commit is contained in:
2021-12-01 19:04:59 +08:00
parent b279e56efd
commit 7fef63fa39
3 changed files with 64 additions and 8 deletions
+3 -2
View File
@@ -2,6 +2,7 @@
namespace Kiri\Rpc\Note;
use Kiri\Consul\Catalog\Catalog;
use Note\Attribute;
use Kiri\Abstracts\Config;
use Kiri\Consul\Agent;
@@ -40,8 +41,8 @@ use ReflectionException;
public function execute(mixed $class, mixed $method = ''): bool
{
$default = $this->create();
$agent = Kiri::getDi()->get(Agent::class);
$data = $agent->service->register($default);
$agent = Kiri::getDi()->get(Catalog::class);
$data = $agent->register($default);
if ($data->getStatusCode() != 200) {
exit($data->getBody()->getContents());
}