This commit is contained in:
2021-07-05 15:42:44 +08:00
parent d3fd4385e6
commit 74bcdf257e
5 changed files with 559 additions and 240 deletions
+12
View File
@@ -38,6 +38,7 @@ use Snowflake\Event;
use Snowflake\Exception\InitException;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Jwt\Jwt;
use Snowflake\Pool\ClientsPool;
use Snowflake\Pool\Connection;
use Snowflake\Pool\Pool as SPool;
use Snowflake\Pool\Redis as SRedis;
@@ -434,6 +435,16 @@ abstract class BaseApplication extends Service
}
/**
* @return ClientsPool
* @throws Exception
*/
public function getClientsPool(): ClientsPool
{
return $this->get('clientsPool');
}
/**
* @throws Exception
*/
@@ -444,6 +455,7 @@ abstract class BaseApplication extends Service
'connections' => ['class' => Connection::class],
'redis_connections' => ['class' => SRedis::class],
'pool' => ['class' => SPool::class],
'clientsPool' => ['class' => ClientsPool::class],
'config' => ['class' => Config::class],
'logger' => ['class' => Logger::class],
'annotation' => ['class' => SAnnotation::class],