diff --git a/.gitignore b/.gitignore index 7fe978f..0171683 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,5 @@ yarn-error.log /.fleet /.idea /.vscode +rr +.rr.yaml diff --git a/README.md b/README.md index 3ed385a..5b297cc 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,9 @@ -
+# Install Protoc - +```bash +./vendor/bin/rr download-protoc-binary +``` -## About Laravel - -Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: - -- [Simple, fast routing engine](https://laravel.com/docs/routing). -- [Powerful dependency injection container](https://laravel.com/docs/container). -- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. -- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). -- Database agnostic [schema migrations](https://laravel.com/docs/migrations). -- [Robust background job processing](https://laravel.com/docs/queues). -- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). - -Laravel is accessible, powerful, and provides tools required for large, robust applications. - -## Learning Laravel - -Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. - -You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch. - -If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. - -## Laravel Sponsors - -We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell). - -### Premium Partners - -- **[Vehikl](https://vehikl.com/)** -- **[Tighten Co.](https://tighten.co)** -- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** -- **[64 Robots](https://64robots.com)** -- **[Cubet Techno Labs](https://cubettech.com)** -- **[Cyber-Duck](https://cyber-duck.co.uk)** -- **[Many](https://www.many.co.uk)** -- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)** -- **[DevSquad](https://devsquad.com)** -- **[Curotec](https://www.curotec.com/services/technologies/laravel/)** -- **[OP.GG](https://op.gg)** -- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)** -- **[Lendio](https://lendio.com)** - -## Contributing - -Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). - -## Code of Conduct - -In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). - -## Security Vulnerabilities - -If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. - -## License - -The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). +```bash +protoc --plugin=/Users/ivampiresp/.bin/protoc-gen-php-grpc --php_out=. --php-grpc_out=. resources/proto/pinger.proto +``` diff --git a/app/Console/Commands/Init.php b/app/Console/Commands/Init.php new file mode 100644 index 0000000..be630f9 --- /dev/null +++ b/app/Console/Commands/Init.php @@ -0,0 +1,139 @@ +warn("另一个初始化进程正在运行中。如果确定没有其他进程在运行,请手动删除 {$lock} 文件。"); + // 如果有 --start 参数,则启动 Web 服务 + if ($this->option('start')) { + $this->warn("正在等待另一个进程初始化完成。"); + // 一直等待锁文件被删除 + while (file_exists($lock)) { + sleep(1); + } + + $this->call('serve'); + } + + return; + } + + $this->info("上锁。"); + // 加锁 + file_put_contents($lock, ''); + + // 检测有无 .env + if (!file_exists(base_path('.env'))) { + // 复制 .env.example + $this->info("复制 .env.example 为 .env"); + copy(base_path('.env.example'), base_path('.env')); + } + + // 检测是否有 APP_KEY + $APP_KEY = env('APP_KEY'); + if (empty($APP_KEY)) { + // 初始化 + $this->info("生成应用程序密钥。"); + $this->call('key:generate'); + } + + $this->info("初始化 storage 目录。"); + // 初始化 storage 目录 + $this->initStorageDir(); + + $this->info("初始化数据库。"); + + // force migrate + $this->call('migrate', [ + '--force' => true, + ]); + + $this->info("生成缓存。"); + $this->call('optimize'); + + $this->info("解锁"); + // 解锁 + unlink($lock); + + // 输出 + $this->info('应用程序初始化完成。'); + + if ($this->option('start')) { + $this->info('启动 Web 服务。'); + $this->call('octane:start', [ + '--host' => '0.0.0.0' + ]); + } + } + + private function initStorageDir(): void + { + // 检测 storage 下的目录是否正确 + $storage = storage_path(); + + // 有无 app 目录 + if (!is_dir($storage . '/app')) { + mkdir($storage . '/app'); + + // 有无 public 目录 + if (!is_dir($storage . '/app/public')) { + mkdir($storage . '/app/public'); + } + } + + // 有无 framework 目录 + if (!is_dir($storage . '/framework')) { + mkdir($storage . '/framework'); + + // 有无 cache 目录 + if (!is_dir($storage . '/framework/cache')) { + mkdir($storage . '/framework/cache'); + } + + // 有无 sessions 目录 + if (!is_dir($storage . '/framework/sessions')) { + mkdir($storage . '/framework/sessions'); + } + + // 有无 testing 目录 + if (!is_dir($storage . '/framework/testing')) { + mkdir($storage . '/framework/testing'); + } + + // 有无 views 目录 + if (!is_dir($storage . '/framework/views')) { + mkdir($storage . '/framework/views'); + } + } + + // 有无 logs 目录 + if (!is_dir($storage . '/logs')) { + mkdir($storage . '/logs'); + } + } +} diff --git a/app/Console/Commands/Works.php b/app/Console/Commands/Works.php new file mode 100644 index 0000000..0dbb5da --- /dev/null +++ b/app/Console/Commands/Works.php @@ -0,0 +1,41 @@ + false, + ]); + + $server->registerService(PingerInterface::class, new PingerService()); + + $server->serve(Worker::create()); + } +} diff --git a/app/Services/PingerService.php b/app/Services/PingerService.php new file mode 100644 index 0000000..e288691 --- /dev/null +++ b/app/Services/PingerService.php @@ -0,0 +1,20 @@ + rand(200, 500) + ]); + } +} \ No newline at end of file diff --git a/app/Services/gRPC/GPBMetadata/Pinger.php b/app/Services/gRPC/GPBMetadata/Pinger.php new file mode 100644 index 0000000..47e0dcf Binary files /dev/null and b/app/Services/gRPC/GPBMetadata/Pinger.php differ diff --git a/app/Services/gRPC/Pinger/PingRequest.php b/app/Services/gRPC/Pinger/PingRequest.php new file mode 100644 index 0000000..df83ce9 --- /dev/null +++ b/app/Services/gRPC/Pinger/PingRequest.php @@ -0,0 +1,58 @@ +pinger.PingRequest + */ +class PingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf fieldstring url = 1;
+ */
+ protected $url = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $url
+ * }
+ */
+ public function __construct($data = NULL) {
+ \App\Services\gRPC\GPBMetadata\Pinger::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field string url = 1;
+ * @return string
+ */
+ public function getUrl()
+ {
+ return $this->url;
+ }
+
+ /**
+ * Generated from protobuf field string url = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setUrl($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->url = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/app/Services/gRPC/Pinger/PingResponse.php b/app/Services/gRPC/Pinger/PingResponse.php
new file mode 100644
index 0000000..8dff078
--- /dev/null
+++ b/app/Services/gRPC/Pinger/PingResponse.php
@@ -0,0 +1,58 @@
+pinger.PingResponse
+ */
+class PingResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Generated from protobuf field int32 status_code = 1;
+ */
+ protected $status_code = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type int $status_code
+ * }
+ */
+ public function __construct($data = NULL) {
+ \App\Services\gRPC\GPBMetadata\Pinger::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Generated from protobuf field int32 status_code = 1;
+ * @return int
+ */
+ public function getStatusCode()
+ {
+ return $this->status_code;
+ }
+
+ /**
+ * Generated from protobuf field int32 status_code = 1;
+ * @param int $var
+ * @return $this
+ */
+ public function setStatusCode($var)
+ {
+ GPBUtil::checkInt32($var);
+ $this->status_code = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/app/Services/gRPC/Pinger/PingerInterface.php b/app/Services/gRPC/Pinger/PingerInterface.php
new file mode 100644
index 0000000..47a1dc8
--- /dev/null
+++ b/app/Services/gRPC/Pinger/PingerInterface.php
@@ -0,0 +1,22 @@
+=7.4"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Google\\Api\\": "src/Api",
+ "Google\\Iam\\": "src/Iam",
+ "Google\\Rpc\\": "src/Rpc",
+ "Google\\Type\\": "src/Type",
+ "Google\\Cloud\\": "src/Cloud",
+ "GPBMetadata\\Google\\Api\\": "metadata/Api",
+ "GPBMetadata\\Google\\Iam\\": "metadata/Iam",
+ "GPBMetadata\\Google\\Rpc\\": "metadata/Rpc",
+ "GPBMetadata\\Google\\Type\\": "metadata/Type",
+ "GPBMetadata\\Google\\Cloud\\": "metadata/Cloud",
+ "GPBMetadata\\Google\\Logging\\": "metadata/Logging"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "description": "Google API Common Protos for PHP",
+ "homepage": "https://github.com/googleapis/common-protos-php",
+ "keywords": [
+ "google"
+ ],
+ "support": {
+ "issues": "https://github.com/googleapis/common-protos-php/issues",
+ "source": "https://github.com/googleapis/common-protos-php/tree/v4.3.0"
+ },
+ "time": "2023-08-22T18:10:13+00:00"
+ },
+ {
+ "name": "google/protobuf",
+ "version": "v3.24.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/protocolbuffers/protobuf-php.git",
+ "reference": "672d69e25f71b9364fdf1810eb8a8573defdc404"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/672d69e25f71b9364fdf1810eb8a8573defdc404",
+ "reference": "672d69e25f71b9364fdf1810eb8a8573defdc404",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
+ },
+ "require": {
+ "php": ">=7.0.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": ">=5.0.0"
+ },
+ "suggest": {
+ "ext-bcmath": "Need to support JSON deserialization"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Google\\Protobuf\\": "src/Google/Protobuf",
+ "GPBMetadata\\Google\\Protobuf\\": "src/GPBMetadata/Google/Protobuf"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "proto library for PHP",
+ "homepage": "https://developers.google.com/protocol-buffers/",
+ "keywords": [
+ "proto"
+ ],
+ "support": {
+ "source": "https://github.com/protocolbuffers/protobuf-php/tree/v3.24.4"
+ },
+ "time": "2023-10-04T17:22:47+00:00"
+ },
{
"name": "graham-campbell/result-type",
"version": "v1.1.1",
@@ -3752,6 +3947,711 @@
],
"time": "2023-04-15T23:01:58+00:00"
},
+ {
+ "name": "spiral/core",
+ "version": "3.9.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spiral/core.git",
+ "reference": "9d9c39f76225409c01d3936077841a3ba67254f5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spiral/core/zipball/9d9c39f76225409c01d3936077841a3ba67254f5",
+ "reference": "9d9c39f76225409c01d3936077841a3ba67254f5",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
+ },
+ "require": {
+ "php": ">=8.1",
+ "psr/container": "^1.1|^2.0"
+ },
+ "provide": {
+ "psr/container-implementation": "^1.1|^2.0"
+ },
+ "require-dev": {
+ "mockery/mockery": "^1.5",
+ "phpunit/phpunit": "^10.1",
+ "vimeo/psalm": "^5.9"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.10.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Spiral\\Core\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Pavel Butchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "email": "alexey.gagarin@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ }
+ ],
+ "description": "IoC container, IoC scopes, factory, memory, configuration interfaces",
+ "homepage": "https://spiral.dev",
+ "support": {
+ "issues": "https://github.com/spiral/framework/issues",
+ "source": "https://github.com/spiral/core"
+ },
+ "time": "2023-10-19T14:19:18+00:00"
+ },
+ {
+ "name": "spiral/goridge",
+ "version": "4.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/goridge.git",
+ "reference": "56302fc0b677e7874a64ad5d76177e802f963a2a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/goridge/zipball/56302fc0b677e7874a64ad5d76177e802f963a2a",
+ "reference": "56302fc0b677e7874a64ad5d76177e802f963a2a",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
+ },
+ "require": {
+ "ext-json": "*",
+ "ext-sockets": "*",
+ "php": ">=8.1",
+ "spiral/roadrunner": "^2023"
+ },
+ "require-dev": {
+ "google/protobuf": "^3.22",
+ "infection/infection": "^0.26.1",
+ "jetbrains/phpstorm-attributes": "^1.0",
+ "phpunit/phpunit": "^10.0",
+ "rybakit/msgpack": "^0.7",
+ "vimeo/psalm": "^5.9"
+ },
+ "suggest": {
+ "ext-msgpack": "MessagePack codec support",
+ "ext-protobuf": "Protobuf codec support",
+ "google/protobuf": "(^3.0) Protobuf codec support",
+ "rybakit/msgpack": "(^0.7) MessagePack codec support"
+ },
+ "type": "goridge",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\Goridge\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Valery Piashchynski",
+ "homepage": "https://github.com/rustatian"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "homepage": "https://github.com/roxblnfk"
+ },
+ {
+ "name": "Pavel Buchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "High-performance PHP-to-Golang RPC bridge",
+ "homepage": "https://spiral.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://roadrunner.dev/docs",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-php/goridge/tree/4.0.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "time": "2023-04-13T11:38:18+00:00"
+ },
+ {
+ "name": "spiral/logger",
+ "version": "3.9.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spiral/logger.git",
+ "reference": "87c448e8c38eb346526584c24a1ca285bec1ce58"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spiral/logger/zipball/87c448e8c38eb346526584c24a1ca285bec1ce58",
+ "reference": "87c448e8c38eb346526584c24a1ca285bec1ce58",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
+ },
+ "require": {
+ "php": ">=8.1",
+ "psr/log": "1 - 3",
+ "spiral/core": "^3.9.1"
+ },
+ "require-dev": {
+ "mockery/mockery": "^1.5",
+ "phpunit/phpunit": "^10.1",
+ "vimeo/psalm": "^5.9"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.10.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Spiral\\Logger\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Pavel Butchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "email": "alexey.gagarin@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ }
+ ],
+ "description": "LogFactory and global log listeners",
+ "homepage": "https://spiral.dev",
+ "support": {
+ "issues": "https://github.com/spiral/framework/issues",
+ "source": "https://github.com/spiral/logger"
+ },
+ "time": "2023-10-24T14:07:14+00:00"
+ },
+ {
+ "name": "spiral/roadrunner",
+ "version": "v2023.3.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-server/roadrunner.git",
+ "reference": "b5acfd6212252c1977990e88f416b2d813939a03"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-server/roadrunner/zipball/b5acfd6212252c1977990e88f416b2d813939a03",
+ "reference": "b5acfd6212252c1977990e88f416b2d813939a03",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
+ },
+ "type": "metapackage",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov / Wolfy-J",
+ "email": "wolfy.jd@gmail.com"
+ },
+ {
+ "name": "Valery Piashchynski",
+ "homepage": "https://github.com/rustatian"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins",
+ "homepage": "https://roadrunner.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://roadrunner.dev/docs",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-server/roadrunner/tree/v2023.3.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "time": "2023-10-26T17:36:10+00:00"
+ },
+ {
+ "name": "spiral/roadrunner-cli",
+ "version": "v2.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/cli.git",
+ "reference": "468c4a646d10a38b1475ec7b71f5880aa354febf"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/cli/zipball/468c4a646d10a38b1475ec7b71f5880aa354febf",
+ "reference": "468c4a646d10a38b1475ec7b71f5880aa354febf",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
+ },
+ "require": {
+ "composer/semver": "^3.2",
+ "ext-json": "*",
+ "php": ">=7.4",
+ "spiral/roadrunner-worker": ">=2.0.2",
+ "spiral/tokenizer": "^2.13 || ^3.0",
+ "symfony/console": "^4.4|^5.0|^6.0",
+ "symfony/http-client": "^4.4|^5.0|^6.0",
+ "symfony/polyfill-php80": "^1.22",
+ "symfony/yaml": "^5.4 || ^6.0"
+ },
+ "require-dev": {
+ "jetbrains/phpstorm-attributes": "^1.0",
+ "symfony/var-dumper": "^4.4|^5.0",
+ "vimeo/psalm": "^4.4"
+ },
+ "bin": [
+ "bin/rr"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Spiral\\RoadRunner\\Console\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/spiral/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "RoadRunner: Command Line Interface",
+ "support": {
+ "issues": "https://github.com/roadrunner-php/cli/issues",
+ "source": "https://github.com/roadrunner-php/cli/tree/v2.5.0"
+ },
+ "time": "2023-04-18T14:19:26+00:00"
+ },
+ {
+ "name": "spiral/roadrunner-grpc",
+ "version": "3.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/grpc.git",
+ "reference": "94b5ec7a4ae8e0ef479f7c056069f42c9041bebe"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/grpc/zipball/94b5ec7a4ae8e0ef479f7c056069f42c9041bebe",
+ "reference": "94b5ec7a4ae8e0ef479f7c056069f42c9041bebe",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
+ },
+ "require": {
+ "ext-json": "*",
+ "google/common-protos": "^3.1|^4.0",
+ "google/protobuf": "^3.7",
+ "php": ">=8.1",
+ "spiral/goridge": "^4.0",
+ "spiral/roadrunner": "^2023.1",
+ "spiral/roadrunner-worker": "^3.0"
+ },
+ "require-dev": {
+ "jetbrains/phpstorm-attributes": "^1.0",
+ "mockery/mockery": "^1.4",
+ "phpunit/phpunit": "^10.0",
+ "vimeo/psalm": ">=5.8"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\RoadRunner\\GRPC\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Pavel Buchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "email": "alexey.gagarin@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/spiral/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "High-Performance GRPC server for PHP applications",
+ "homepage": "https://roadrunner.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://roadrunner.dev/docs",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-php/grpc/tree/3.1.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "time": "2023-10-26T08:12:59+00:00"
+ },
+ {
+ "name": "spiral/roadrunner-http",
+ "version": "3.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/http.git",
+ "reference": "c6e6f0a547dbde79408d57e92e0711dd42082c0e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/http/zipball/c6e6f0a547dbde79408d57e92e0711dd42082c0e",
+ "reference": "c6e6f0a547dbde79408d57e92e0711dd42082c0e",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
+ },
+ "require": {
+ "ext-json": "*",
+ "php": ">=8.1",
+ "psr/http-factory": "^1.0.1",
+ "psr/http-message": "^1.0.1 || ^2.0",
+ "spiral/roadrunner": "^2023.1",
+ "spiral/roadrunner-worker": "^3.0"
+ },
+ "require-dev": {
+ "jetbrains/phpstorm-attributes": "^1.0",
+ "nyholm/psr7": "^1.3",
+ "phpunit/phpunit": "^10.0",
+ "symfony/process": "^6.2",
+ "vimeo/psalm": "^5.9"
+ },
+ "suggest": {
+ "spiral/roadrunner-cli": "Provides RoadRunner installation and management CLI tools"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\RoadRunner\\Http\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Valery Piashchynski",
+ "homepage": "https://github.com/rustatian"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "homepage": "https://github.com/roxblnfk"
+ },
+ {
+ "name": "Pavel Buchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "RoadRunner: HTTP and PSR-7 worker",
+ "homepage": "https://spiral.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://roadrunner.dev/docs",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-php/http/tree/3.1.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "time": "2023-07-17T16:19:35+00:00"
+ },
+ {
+ "name": "spiral/roadrunner-worker",
+ "version": "3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/roadrunner-php/worker.git",
+ "reference": "97f966a6685809c7fa024b022f953bd1ae3b6135"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/roadrunner-php/worker/zipball/97f966a6685809c7fa024b022f953bd1ae3b6135",
+ "reference": "97f966a6685809c7fa024b022f953bd1ae3b6135",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
+ },
+ "require": {
+ "composer-runtime-api": "^2.0",
+ "ext-json": "*",
+ "ext-sockets": "*",
+ "php": ">=8.1",
+ "psr/log": "^2.0|^3.0",
+ "spiral/goridge": "^4.0",
+ "spiral/roadrunner": "^2023.1"
+ },
+ "require-dev": {
+ "jetbrains/phpstorm-attributes": "^1.0",
+ "phpunit/phpunit": "^10.0",
+ "symfony/var-dumper": "^6.3",
+ "vimeo/psalm": "^5.9"
+ },
+ "suggest": {
+ "spiral/roadrunner-cli": "Provides RoadRunner installation and management CLI tools"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Spiral\\RoadRunner\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Valery Piashchynski",
+ "homepage": "https://github.com/rustatian"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "homepage": "https://github.com/roxblnfk"
+ },
+ {
+ "name": "Pavel Buchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ },
+ {
+ "name": "RoadRunner Community",
+ "homepage": "https://github.com/roadrunner-server/roadrunner/graphs/contributors"
+ }
+ ],
+ "description": "RoadRunner: PHP worker",
+ "homepage": "https://spiral.dev/",
+ "support": {
+ "chat": "https://discord.gg/V6EK4he",
+ "docs": "https://roadrunner.dev/docs",
+ "forum": "https://forum.roadrunner.dev/",
+ "issues": "https://github.com/roadrunner-server/roadrunner/issues",
+ "source": "https://github.com/roadrunner-php/worker/tree/3.0.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/roadrunner-server",
+ "type": "github"
+ }
+ ],
+ "time": "2023-04-12T11:16:47+00:00"
+ },
+ {
+ "name": "spiral/tokenizer",
+ "version": "3.9.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spiral/tokenizer.git",
+ "reference": "05aa5ab2b984545b5e383059d0fae32e1a885ac6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spiral/tokenizer/zipball/05aa5ab2b984545b5e383059d0fae32e1a885ac6",
+ "reference": "05aa5ab2b984545b5e383059d0fae32e1a885ac6",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "php": ">=8.1",
+ "spiral/core": "^3.9.1",
+ "spiral/logger": "^3.9.1",
+ "symfony/finder": "^5.3.7|^6.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^10.1",
+ "spiral/attributes": "^2.8|^3.0",
+ "spiral/boot": "^3.9.1",
+ "spiral/files": "^3.9.1",
+ "vimeo/psalm": "^5.9"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.10.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Spiral\\Tokenizer\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Anton Titov (wolfy-j)",
+ "email": "wolfy-j@spiralscout.com"
+ },
+ {
+ "name": "Pavel Butchnev (butschster)",
+ "email": "pavel.buchnev@spiralscout.com"
+ },
+ {
+ "name": "Aleksei Gagarin (roxblnfk)",
+ "email": "alexey.gagarin@spiralscout.com"
+ },
+ {
+ "name": "Maksim Smakouz (msmakouz)",
+ "email": "maksim.smakouz@spiralscout.com"
+ }
+ ],
+ "description": "Static Analysis: Class and Invocation locators",
+ "homepage": "https://spiral.dev",
+ "support": {
+ "issues": "https://github.com/spiral/framework/issues",
+ "source": "https://github.com/spiral/tokenizer"
+ },
+ "time": "2023-10-24T14:07:58+00:00"
+ },
{
"name": "symfony/console",
"version": "v6.3.4",
@@ -4310,6 +5210,188 @@
],
"time": "2023-09-26T12:56:25+00:00"
},
+ {
+ "name": "symfony/http-client",
+ "version": "v6.3.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/http-client.git",
+ "reference": "cd67fcaf4524ec6ae5d9b2d9497682d7ad3ce57d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/http-client/zipball/cd67fcaf4524ec6ae5d9b2d9497682d7ad3ce57d",
+ "reference": "cd67fcaf4524ec6ae5d9b2d9497682d7ad3ce57d",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
+ },
+ "require": {
+ "php": ">=8.1",
+ "psr/log": "^1|^2|^3",
+ "symfony/deprecation-contracts": "^2.5|^3",
+ "symfony/http-client-contracts": "^3",
+ "symfony/service-contracts": "^2.5|^3"
+ },
+ "conflict": {
+ "php-http/discovery": "<1.15",
+ "symfony/http-foundation": "<6.3"
+ },
+ "provide": {
+ "php-http/async-client-implementation": "*",
+ "php-http/client-implementation": "*",
+ "psr/http-client-implementation": "1.0",
+ "symfony/http-client-implementation": "3.0"
+ },
+ "require-dev": {
+ "amphp/amp": "^2.5",
+ "amphp/http-client": "^4.2.1",
+ "amphp/http-tunnel": "^1.0",
+ "amphp/socket": "^1.1",
+ "guzzlehttp/promises": "^1.4",
+ "nyholm/psr7": "^1.0",
+ "php-http/httplug": "^1.0|^2.0",
+ "psr/http-client": "^1.0",
+ "symfony/dependency-injection": "^5.4|^6.0",
+ "symfony/http-kernel": "^5.4|^6.0",
+ "symfony/process": "^5.4|^6.0",
+ "symfony/stopwatch": "^5.4|^6.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\HttpClient\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "http"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/http-client/tree/v6.3.7"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2023-10-29T12:41:36+00:00"
+ },
+ {
+ "name": "symfony/http-client-contracts",
+ "version": "v3.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/http-client-contracts.git",
+ "reference": "3b66325d0176b4ec826bffab57c9037d759c31fb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/3b66325d0176b4ec826bffab57c9037d759c31fb",
+ "reference": "3b66325d0176b4ec826bffab57c9037d759c31fb",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
+ },
+ "require": {
+ "php": ">=8.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.4-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\HttpClient\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Test/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Generic abstractions related to HTTP clients",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/http-client-contracts/tree/v3.3.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2023-05-23T14:45:45+00:00"
+ },
{
"name": "symfony/http-foundation",
"version": "v6.3.7",
@@ -6266,6 +7348,84 @@
],
"time": "2023-10-12T18:45:56+00:00"
},
+ {
+ "name": "symfony/yaml",
+ "version": "v6.3.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/yaml.git",
+ "reference": "9758b6c69d179936435d0ffb577c3708d57e38a8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/9758b6c69d179936435d0ffb577c3708d57e38a8",
+ "reference": "9758b6c69d179936435d0ffb577c3708d57e38a8",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
+ },
+ "require": {
+ "php": ">=8.1",
+ "symfony/deprecation-contracts": "^2.5|^3",
+ "symfony/polyfill-ctype": "^1.8"
+ },
+ "conflict": {
+ "symfony/console": "<5.4"
+ },
+ "require-dev": {
+ "symfony/console": "^5.4|^6.0"
+ },
+ "bin": [
+ "Resources/bin/yaml-lint"
+ ],
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Yaml\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Loads and dumps YAML files",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/yaml/tree/v6.3.7"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2023-10-28T23:31:00+00:00"
+ },
{
"name": "tightenco/ziggy",
"version": "v1.8.0",
@@ -9160,84 +10320,6 @@
],
"time": "2023-08-23T06:24:34+00:00"
},
- {
- "name": "symfony/yaml",
- "version": "v6.3.7",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/yaml.git",
- "reference": "9758b6c69d179936435d0ffb577c3708d57e38a8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/9758b6c69d179936435d0ffb577c3708d57e38a8",
- "reference": "9758b6c69d179936435d0ffb577c3708d57e38a8",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=8.1",
- "symfony/deprecation-contracts": "^2.5|^3",
- "symfony/polyfill-ctype": "^1.8"
- },
- "conflict": {
- "symfony/console": "<5.4"
- },
- "require-dev": {
- "symfony/console": "^5.4|^6.0"
- },
- "bin": [
- "Resources/bin/yaml-lint"
- ],
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Yaml\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Loads and dumps YAML files",
- "homepage": "https://symfony.com",
- "support": {
- "source": "https://github.com/symfony/yaml/tree/v6.3.7"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2023-10-28T23:31:00+00:00"
- },
{
"name": "theseer/tokenizer",
"version": "1.2.1",
diff --git a/config/octane.php b/config/octane.php
new file mode 100644
index 0000000..818ee70
--- /dev/null
+++ b/config/octane.php
@@ -0,0 +1,221 @@
+ env('OCTANE_SERVER', 'roadrunner'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Force HTTPS
+ |--------------------------------------------------------------------------
+ |
+ | When this configuration value is set to "true", Octane will inform the
+ | framework that all absolute links must be generated using the HTTPS
+ | protocol. Otherwise your links may be generated using plain HTTP.
+ |
+ */
+
+ 'https' => env('OCTANE_HTTPS', false),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Octane Listeners
+ |--------------------------------------------------------------------------
+ |
+ | All of the event listeners for Octane's events are defined below. These
+ | listeners are responsible for resetting your application's state for
+ | the next request. You may even add your own listeners to the list.
+ |
+ */
+
+ 'listeners' => [
+ WorkerStarting::class => [
+ EnsureUploadedFilesAreValid::class,
+ EnsureUploadedFilesCanBeMoved::class,
+ ],
+
+ RequestReceived::class => [
+ ...Octane::prepareApplicationForNextOperation(),
+ ...Octane::prepareApplicationForNextRequest(),
+ //
+ ],
+
+ RequestHandled::class => [
+ //
+ ],
+
+ RequestTerminated::class => [
+ // FlushUploadedFiles::class,
+ ],
+
+ TaskReceived::class => [
+ ...Octane::prepareApplicationForNextOperation(),
+ //
+ ],
+
+ TaskTerminated::class => [
+ //
+ ],
+
+ TickReceived::class => [
+ ...Octane::prepareApplicationForNextOperation(),
+ //
+ ],
+
+ TickTerminated::class => [
+ //
+ ],
+
+ OperationTerminated::class => [
+ FlushTemporaryContainerInstances::class,
+ // DisconnectFromDatabases::class,
+ // CollectGarbage::class,
+ ],
+
+ WorkerErrorOccurred::class => [
+ ReportException::class,
+ StopWorkerIfNecessary::class,
+ ],
+
+ WorkerStopping::class => [
+ //
+ ],
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Warm / Flush Bindings
+ |--------------------------------------------------------------------------
+ |
+ | The bindings listed below will either be pre-warmed when a worker boots
+ | or they will be flushed before every new request. Flushing a binding
+ | will force the container to resolve that binding again when asked.
+ |
+ */
+
+ 'warm' => [
+ ...Octane::defaultServicesToWarm(),
+ ],
+
+ 'flush' => [
+ //
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Octane Cache Table
+ |--------------------------------------------------------------------------
+ |
+ | While using Swoole, you may leverage the Octane cache, which is powered
+ | by a Swoole table. You may set the maximum number of rows as well as
+ | the number of bytes per row using the configuration options below.
+ |
+ */
+
+ 'cache' => [
+ 'rows' => 1000,
+ 'bytes' => 10000,
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Octane Swoole Tables
+ |--------------------------------------------------------------------------
+ |
+ | While using Swoole, you may define additional tables as required by the
+ | application. These tables can be used to store data that needs to be
+ | quickly accessed by other workers on the particular Swoole server.
+ |
+ */
+
+ 'tables' => [
+ 'example:1000' => [
+ 'name' => 'string:1000',
+ 'votes' => 'int',
+ ],
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | File Watching
+ |--------------------------------------------------------------------------
+ |
+ | The following list of files and directories will be watched when using
+ | the --watch option offered by Octane. If any of the directories and
+ | files are changed, Octane will automatically reload your workers.
+ |
+ */
+
+ 'watch' => [
+ 'app',
+ 'bootstrap',
+ 'config',
+ 'database',
+ 'public/**/*.php',
+ 'resources/**/*.php',
+ 'routes',
+ 'composer.lock',
+ '.env',
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Garbage Collection Threshold
+ |--------------------------------------------------------------------------
+ |
+ | When executing long-lived PHP scripts such as Octane, memory can build
+ | up before being cleared by PHP. You can force Octane to run garbage
+ | collection if your application consumes this amount of megabytes.
+ |
+ */
+
+ 'garbage' => 50,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Maximum Execution Time
+ |--------------------------------------------------------------------------
+ |
+ | The following setting configures the maximum execution time for requests
+ | being handled by Octane. You may set this value to 0 to indicate that
+ | there isn't a specific time limit on Octane request execution time.
+ |
+ */
+
+ 'max_execution_time' => 30,
+
+];
diff --git a/resources/proto/pinger.proto b/resources/proto/pinger.proto
new file mode 100644
index 0000000..5b69f73
--- /dev/null
+++ b/resources/proto/pinger.proto
@@ -0,0 +1,18 @@
+syntax = "proto3";
+
+option php_namespace = "App\\Services\\gRPC\\Pinger";
+option php_metadata_namespace = "App\\Services\\gRPC\\GPBMetadata";
+
+package pinger;
+
+service Pinger {
+ rpc ping (PingRequest) returns (PingResponse) {}
+}
+
+message PingRequest {
+ string url = 1;
+}
+
+message PingResponse {
+ int32 status_code = 1;
+}
\ No newline at end of file