This commit is contained in:
2021-09-06 14:20:43 +08:00
parent 2f68ae1757
commit d82b2228b4
3 changed files with 28 additions and 13 deletions
+17
View File
@@ -2,6 +2,10 @@
namespace Kiri\Rpc;
use Exception;
use Kiri\Exception\NotFindClassException;
use ReflectionException;
class Registry
{
// KV
@@ -48,4 +52,17 @@ class Registry
const DEFAULT_HTTP_TIMEOUT = 30;
/**
* @param $name
* @return array
* @throws NotFindClassException
* @throws ReflectionException
* @throws Exception
*/
public function getService($name): array
{
return di(Client::class)->get($name);
}
}