phptars / tars-report
该包最新版本(0.1.3)没有提供许可证信息。
tars进行keep-alive上报的模块
0.1.3
2018-12-24 07:45 UTC
Requires
- php: >=5.3
This package is auto-updated.
Last update: 2024-09-28 06:27:52 UTC
README
- 组件描述
When the master process is started, the tarsphp framework will report the service survival status (main process survival & management process survival).
When the first worker process is started, a timer will be opened to regularly report the survival status.
- 文档描述
├── composer.json
├── src
│ ├── NodeF.tars //protocol file
│ ├── ServerFAsync.php // Asynchronous reporting
│ ├── ServerFSync.php // synchronous reporting
│ └── ServerInfo.php //ServerInfo
3、使用实例(如果服务是PHPTest.test.obj):
$serverInfo = new ServerInfo();
$serverInfo->adapter = 'PHPTest.test.objAdapter';
$serverInfo->application = 'PHPTest';
$serverInfo->serverName = 'test';
$serverInfo->pid = $masterPid;
$serverF = new ServerFSync($host, $port, $objName);
$serverF->keepAlive($serverInfo); //Main process survives
$adminServerInfo = new ServerInfo();
$adminServerInfo->adapter = 'AdminAdapter';
$adminServerInfo->application = 'PHPTest';
$adminServerInfo->serverName = 'test';
$adminServerInfo->pid = $masterPid;
$serverF->keepAlive($adminServerInfo);//Manage process survival