Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 1.59 KB

README.md

File metadata and controls

63 lines (43 loc) · 1.59 KB

Gateway Worker For Laravel/Lumen

Latest Stable Version Total Downloads GitHub license

Installation

Laravel

composer require addcnos/laravel-gateway-worker

publish

php artisan vendor:publish --provider="Addcnos\GatewayWorker\GatewayWorkerServiceProvider"

Lumen

copy config

cp vendor/addcnos/laravel-gateway-worker/config/gatewayworker.php config

edit bootstrap/app.php, add

$app->register(Addcnos\GatewayWorker\GatewayWorkerServiceProvider::class);
// ...
$app->configure('gatewayworker');

Usage

php artisan gateway-worker:serve [start|stop|restart|status|connections|help]

for help

php artisan gateway-worker:serve --help

Cluster

Cluster

Role IP Command
Register 192.168.1.101 php artisan gateway-worker:serve --register --register-bind=0.0.0.0:1215
Gateway 192.168.2.102-105 php artisan gateway-worker:serve --gateway --gateway-bind=0.0.0.0:1216 --register-address=192.168.1.101:1215 --lan-ip=192.168.1.xxx
Businessworker 192.168.1.106-110 php artisan gateway-worker:serve --businessworker --register-address=192.168.1.101:1215

In One

php artisan --register --gateway --businessworker