modify
This commit is contained in:
@@ -6,6 +6,7 @@ namespace Annotation;
|
|||||||
|
|
||||||
use Kafka\ConsumerInterface;
|
use Kafka\ConsumerInterface;
|
||||||
use Kafka\TaskContainer;
|
use Kafka\TaskContainer;
|
||||||
|
use Snowflake\Snowflake;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Kafka
|
* Class Kafka
|
||||||
@@ -35,7 +36,8 @@ use Kafka\TaskContainer;
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$container = TaskContainer::getInstance();
|
/** @var TaskContainer $container */
|
||||||
|
$container = Snowflake::app()->get('kafka-container');
|
||||||
$container->addConsumer($this->topic, [$handler[0], 'onHandler']);
|
$container->addConsumer($this->topic, [$handler[0], 'onHandler']);
|
||||||
|
|
||||||
return parent::execute($handler); // TODO: Change the autogenerated stub
|
return parent::execute($handler); // TODO: Change the autogenerated stub
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ class OnPipeMessage extends Callback
|
|||||||
{
|
{
|
||||||
[$topic, $message] = $message['body'];
|
[$topic, $message] = $message['body'];
|
||||||
|
|
||||||
$container = TaskContainer::getInstance();
|
/** @var TaskContainer $container */
|
||||||
|
$container = Snowflake::app()->get('kafka-container');
|
||||||
$container->process($topic, new Struct($topic, $message));
|
$container->process($topic, new Struct($topic, $message));
|
||||||
return 'success';
|
return 'success';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,21 +18,6 @@ class TaskContainer extends BaseObject
|
|||||||
private array $_topics = [];
|
private array $_topics = [];
|
||||||
|
|
||||||
|
|
||||||
private static ?TaskContainer $container = null;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Kafka\TaskContainer
|
|
||||||
*/
|
|
||||||
public static function getInstance(): TaskContainer
|
|
||||||
{
|
|
||||||
if (!(static::$container instanceof TaskContainer)) {
|
|
||||||
static::$container = new TaskContainer();
|
|
||||||
}
|
|
||||||
return static::$container;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $topic
|
* @param $topic
|
||||||
* @param $handler
|
* @param $handler
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ use HttpServer\Shutdown;
|
|||||||
use JetBrains\PhpStorm\Pure;
|
use JetBrains\PhpStorm\Pure;
|
||||||
use Kafka\Producer;
|
use Kafka\Producer;
|
||||||
use Annotation\Annotation as SAnnotation;
|
use Annotation\Annotation as SAnnotation;
|
||||||
|
use Kafka\TaskContainer;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use Snowflake\Aop;
|
use Snowflake\Aop;
|
||||||
use Snowflake\Async;
|
use Snowflake\Async;
|
||||||
@@ -51,449 +52,450 @@ use Swoole\Table;
|
|||||||
abstract class BaseApplication extends Service
|
abstract class BaseApplication extends Service
|
||||||
{
|
{
|
||||||
|
|
||||||
use TraitApplication;
|
use TraitApplication;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public string $storage = APP_PATH . 'storage';
|
public string $storage = APP_PATH . 'storage';
|
||||||
|
|
||||||
public string $envPath = APP_PATH . '.env';
|
public string $envPath = APP_PATH . '.env';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init constructor.
|
* Init constructor.
|
||||||
*
|
*
|
||||||
* @param array $config
|
* @param array $config
|
||||||
*
|
*
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
public function __construct(array $config = [])
|
public function __construct(array $config = [])
|
||||||
{
|
{
|
||||||
Snowflake::init($this);
|
Snowflake::init($this);
|
||||||
|
|
||||||
$this->moreComponents();
|
$this->moreComponents();
|
||||||
$this->parseInt($config);
|
$this->parseInt($config);
|
||||||
$this->parseEvents($config);
|
$this->parseEvents($config);
|
||||||
$this->initErrorHandler();
|
$this->initErrorHandler();
|
||||||
$this->enableEnvConfig();
|
$this->enableEnvConfig();
|
||||||
|
|
||||||
parent::__construct($config);
|
parent::__construct($config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function enableEnvConfig(): array
|
public function enableEnvConfig(): array
|
||||||
{
|
{
|
||||||
if (!file_exists($this->envPath)) {
|
if (!file_exists($this->envPath)) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
$lines = $this->readLinesFromFile($this->envPath);
|
$lines = $this->readLinesFromFile($this->envPath);
|
||||||
foreach ($lines as $line) {
|
foreach ($lines as $line) {
|
||||||
if (!$this->isComment($line) && $this->looksLikeSetter($line)) {
|
if (!$this->isComment($line) && $this->looksLikeSetter($line)) {
|
||||||
[$key, $value] = explode('=', $line);
|
[$key, $value] = explode('=', $line);
|
||||||
putenv(trim($key) . '=' . trim($value));
|
putenv(trim($key) . '=' . trim($value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $lines;
|
return $lines;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read lines from the file, auto detecting line endings.
|
* Read lines from the file, auto detecting line endings.
|
||||||
*
|
*
|
||||||
* @param string $filePath
|
* @param string $filePath
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function readLinesFromFile(string $filePath): array
|
protected function readLinesFromFile(string $filePath): array
|
||||||
{
|
{
|
||||||
// Read file into an array of lines with auto-detected line endings
|
// Read file into an array of lines with auto-detected line endings
|
||||||
$autodetect = ini_get('auto_detect_line_endings');
|
$autodetect = ini_get('auto_detect_line_endings');
|
||||||
ini_set('auto_detect_line_endings', '1');
|
ini_set('auto_detect_line_endings', '1');
|
||||||
$lines = file($filePath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
$lines = file($filePath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||||
ini_set('auto_detect_line_endings', $autodetect);
|
ini_set('auto_detect_line_endings', $autodetect);
|
||||||
|
|
||||||
return $lines;
|
return $lines;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if the line in the file is a comment, e.g. begins with a #.
|
* Determine if the line in the file is a comment, e.g. begins with a #.
|
||||||
*
|
*
|
||||||
* @param string $line
|
* @param string $line
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected function isComment(string $line): bool
|
protected function isComment(string $line): bool
|
||||||
{
|
{
|
||||||
$line = ltrim($line);
|
$line = ltrim($line);
|
||||||
|
|
||||||
return isset($line[0]) && $line[0] === '#';
|
return isset($line[0]) && $line[0] === '#';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if the given line looks like it's setting a variable.
|
* Determine if the given line looks like it's setting a variable.
|
||||||
*
|
*
|
||||||
* @param string $line
|
* @param string $line
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
#[Pure] protected function looksLikeSetter(string $line): bool
|
#[Pure] protected function looksLikeSetter(string $line): bool
|
||||||
{
|
{
|
||||||
return str_contains($line, '=');
|
return str_contains($line, '=');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $config
|
* @param $config
|
||||||
*
|
*
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
public function parseInt($config)
|
public function parseInt($config)
|
||||||
{
|
{
|
||||||
foreach ($config as $key => $value) {
|
foreach ($config as $key => $value) {
|
||||||
Config::set($key, $value);
|
Config::set($key, $value);
|
||||||
}
|
}
|
||||||
if ($storage = Config::get('storage', 'storage')) {
|
if ($storage = Config::get('storage', 'storage')) {
|
||||||
if (!str_contains($storage, APP_PATH)) {
|
if (!str_contains($storage, APP_PATH)) {
|
||||||
$storage = APP_PATH . $storage . '/';
|
$storage = APP_PATH . $storage . '/';
|
||||||
}
|
}
|
||||||
if (!is_dir($storage)) {
|
if (!is_dir($storage)) {
|
||||||
mkdir($storage);
|
mkdir($storage);
|
||||||
}
|
}
|
||||||
if (!is_dir($storage) || !is_writeable($storage)) {
|
if (!is_dir($storage) || !is_writeable($storage)) {
|
||||||
throw new InitException("Directory {$storage} does not have write permission");
|
throw new InitException("Directory {$storage} does not have write permission");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $config
|
* @param $config
|
||||||
*
|
*
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
public function parseEvents($config)
|
public function parseEvents($config)
|
||||||
{
|
{
|
||||||
if (!isset($config['events']) || !is_array($config['events'])) {
|
if (!isset($config['events']) || !is_array($config['events'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$event = Snowflake::app()->getEvent();
|
$event = Snowflake::app()->getEvent();
|
||||||
foreach ($config['events'] as $key => $value) {
|
foreach ($config['events'] as $key => $value) {
|
||||||
if (is_string($value)) {
|
if (is_string($value)) {
|
||||||
$value = Snowflake::createObject($value);
|
$value = Snowflake::createObject($value);
|
||||||
}
|
}
|
||||||
$this->addEvent($event, $key, $value);
|
$this->addEvent($event, $key, $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $event
|
* @param $event
|
||||||
* @param $key
|
* @param $key
|
||||||
* @param $value
|
* @param $value
|
||||||
* @throws InitException
|
* @throws InitException
|
||||||
* @throws NotFindClassException
|
* @throws NotFindClassException
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
*/
|
*/
|
||||||
private function addEvent($event, $key, $value): void
|
private function addEvent($event, $key, $value): void
|
||||||
{
|
{
|
||||||
if ($value instanceof \Closure) {
|
if ($value instanceof \Closure) {
|
||||||
$event->on($key, $value, [], true);
|
$event->on($key, $value, [], true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (is_object($value)) {
|
if (is_object($value)) {
|
||||||
$event->on($key, $value, [], true);
|
$event->on($key, $value, [], true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (is_array($value)) {
|
if (is_array($value)) {
|
||||||
if (is_object($value[0]) && !($value[0] instanceof \Closure)) {
|
if (is_object($value[0]) && !($value[0] instanceof \Closure)) {
|
||||||
$event->on($key, $value, [], true);
|
$event->on($key, $value, [], true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_string($value[0])) {
|
if (is_string($value[0])) {
|
||||||
$value[0] = Snowflake::createObject($value[0]);
|
$value[0] = Snowflake::createObject($value[0]);
|
||||||
$event->on($key, $value, [], true);
|
$event->on($key, $value, [], true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($value as $item) {
|
foreach ($value as $item) {
|
||||||
if (!is_callable($item, true)) {
|
if (!is_callable($item, true)) {
|
||||||
throw new InitException("Class does not hav callback.");
|
throw new InitException("Class does not hav callback.");
|
||||||
}
|
}
|
||||||
$event->on($key, $item, [], true);
|
$event->on($key, $item, [], true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $name
|
* @param $name
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function clone($name): mixed
|
public function clone($name): mixed
|
||||||
{
|
{
|
||||||
return clone $this->get($name);
|
return clone $this->get($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function initErrorHandler()
|
public function initErrorHandler()
|
||||||
{
|
{
|
||||||
$this->get('error')->register();
|
$this->get('error')->register();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function getLocalIps(): mixed
|
public function getLocalIps(): mixed
|
||||||
{
|
{
|
||||||
return swoole_get_local_ip();
|
return swoole_get_local_ip();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function getFirstLocal(): mixed
|
public function getFirstLocal(): mixed
|
||||||
{
|
{
|
||||||
return current($this->getLocalIps());
|
return current($this->getLocalIps());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Logger
|
* @return Logger
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getLogger(): Logger
|
public function getLogger(): Logger
|
||||||
{
|
{
|
||||||
return $this->get('logger');
|
return $this->get('logger');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Producer
|
* @return Producer
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getKafka(): Producer
|
public function getKafka(): Producer
|
||||||
{
|
{
|
||||||
return $this->get('kafka');
|
return $this->get('kafka');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Redis|Redis
|
* @return \Redis|Redis
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getRedis(): Redis|\Redis
|
public function getRedis(): Redis|\Redis
|
||||||
{
|
{
|
||||||
return $this->get('redis');
|
return $this->get('redis');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $ip
|
* @param $ip
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isLocal($ip): bool
|
public function isLocal($ip): bool
|
||||||
{
|
{
|
||||||
return $this->getFirstLocal() == $ip;
|
return $this->getFirstLocal() == $ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return ErrorHandler
|
* @return ErrorHandler
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getError(): ErrorHandler
|
public function getError(): ErrorHandler
|
||||||
{
|
{
|
||||||
return $this->get('error');
|
return $this->get('error');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Connection
|
* @return Connection
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getMysqlFromPool(): Connection
|
public function getMysqlFromPool(): Connection
|
||||||
{
|
{
|
||||||
return $this->get('pool')->getDb();
|
return $this->get('pool')->getDb();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return SRedis
|
* @return SRedis
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getRedisFromPool(): SRedis
|
public function getRedisFromPool(): SRedis
|
||||||
{
|
{
|
||||||
return $this->get('pool')->getRedis();
|
return $this->get('pool')->getRedis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Response
|
* @return Response
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getResponse(): Response
|
public function getResponse(): Response
|
||||||
{
|
{
|
||||||
return $this->get('response');
|
return $this->get('response');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Request
|
* @return Request
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getRequest(): Request
|
public function getRequest(): Request
|
||||||
{
|
{
|
||||||
return $this->get('request');
|
return $this->get('request');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $name
|
* @param $name
|
||||||
* @return Table
|
* @return Table
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getTable($name): Table
|
public function getTable($name): Table
|
||||||
{
|
{
|
||||||
return $this->get($name);
|
return $this->get($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Config
|
* @return Config
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getConfig(): Config
|
public function getConfig(): Config
|
||||||
{
|
{
|
||||||
return $this->get('config');
|
return $this->get('config');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Router
|
* @return Router
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getRouter(): Router
|
public function getRouter(): Router
|
||||||
{
|
{
|
||||||
return $this->get('router');
|
return $this->get('router');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Event
|
* @return Event
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getEvent(): Event
|
public function getEvent(): Event
|
||||||
{
|
{
|
||||||
return $this->get('event');
|
return $this->get('event');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Jwt
|
* @return Jwt
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getJwt(): Jwt
|
public function getJwt(): Jwt
|
||||||
{
|
{
|
||||||
return $this->get('jwt');
|
return $this->get('jwt');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Server
|
* @return Server
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getServer(): Server
|
public function getServer(): Server
|
||||||
{
|
{
|
||||||
return $this->get('server');
|
return $this->get('server');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Http|Packet|Receive|Websocket|null
|
* @return Http|Packet|Receive|Websocket|null
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getSwoole(): Packet|Websocket|Receive|Http|null
|
public function getSwoole(): Packet|Websocket|Receive|Http|null
|
||||||
{
|
{
|
||||||
return $this->getServer()->getServer();
|
return $this->getServer()->getServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return SAnnotation
|
* @return SAnnotation
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getAnnotation(): SAnnotation
|
public function getAnnotation(): SAnnotation
|
||||||
{
|
{
|
||||||
return $this->get('annotation');
|
return $this->get('annotation');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Async
|
* @return Async
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getAsync(): Async
|
public function getAsync(): Async
|
||||||
{
|
{
|
||||||
return $this->get('async');
|
return $this->get('async');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Rpc\Producer
|
* @return \Rpc\Producer
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getRpc(): \Rpc\Producer
|
public function getRpc(): \Rpc\Producer
|
||||||
{
|
{
|
||||||
return $this->get('rpc');
|
return $this->get('rpc');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Channel
|
* @return Channel
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getChannel(): Channel
|
public function getChannel(): Channel
|
||||||
{
|
{
|
||||||
return $this->get('channel');
|
return $this->get('channel');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected function moreComponents(): void
|
protected function moreComponents(): void
|
||||||
{
|
{
|
||||||
$this->setComponents([
|
$this->setComponents([
|
||||||
'error' => ['class' => ErrorHandler::class],
|
'error' => ['class' => ErrorHandler::class],
|
||||||
'event' => ['class' => Event::class],
|
'event' => ['class' => Event::class],
|
||||||
'connections' => ['class' => Connection::class],
|
'connections' => ['class' => Connection::class],
|
||||||
'redis_connections' => ['class' => SRedis::class],
|
'redis_connections' => ['class' => SRedis::class],
|
||||||
'pool' => ['class' => SPool::class],
|
'pool' => ['class' => SPool::class],
|
||||||
'response' => ['class' => Response::class],
|
'response' => ['class' => Response::class],
|
||||||
'request' => ['class' => Request::class],
|
'request' => ['class' => Request::class],
|
||||||
'config' => ['class' => Config::class],
|
'config' => ['class' => Config::class],
|
||||||
'logger' => ['class' => Logger::class],
|
'logger' => ['class' => Logger::class],
|
||||||
'annotation' => ['class' => SAnnotation::class],
|
'annotation' => ['class' => SAnnotation::class],
|
||||||
'router' => ['class' => Router::class],
|
'router' => ['class' => Router::class],
|
||||||
'redis' => ['class' => Redis::class],
|
'redis' => ['class' => Redis::class],
|
||||||
'aop' => ['class' => Aop::class],
|
'aop' => ['class' => Aop::class],
|
||||||
'jwt' => ['class' => Jwt::class],
|
'jwt' => ['class' => Jwt::class],
|
||||||
'async' => ['class' => Async::class],
|
'async' => ['class' => Async::class],
|
||||||
'filter' => ['class' => HttpFilter::class],
|
'kafka-container' => ['class' => TaskContainer::class],
|
||||||
'goto' => ['class' => BaseGoto::class],
|
'filter' => ['class' => HttpFilter::class],
|
||||||
'channel' => ['class' => Channel::class],
|
'goto' => ['class' => BaseGoto::class],
|
||||||
'rpc' => ['class' => \Rpc\Producer::class],
|
'channel' => ['class' => Channel::class],
|
||||||
'rpc-service' => ['class' => \Rpc\Service::class],
|
'rpc' => ['class' => \Rpc\Producer::class],
|
||||||
'http2' => ['class' => Http2::class],
|
'rpc-service' => ['class' => \Rpc\Service::class],
|
||||||
'shutdown' => ['class' => Shutdown::class],
|
'http2' => ['class' => Http2::class],
|
||||||
]);
|
'shutdown' => ['class' => Shutdown::class],
|
||||||
}
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user