定制 gipfl/systemd 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gipfl/systemd

最新稳定版本:v0.4.0

Composer 安装命令:

composer require gipfl/systemd

包简介

SystemD-related library

README 文档

README

systemd-related library. Currently: just a WatchDog notifier. WatchDog fires automatically if required from the environment. You're responsible for calling setReady() - and you might want to set Status and Reloading or error state.

Watchdog notifications will fire automagically based on whether systemd is running your daemon or not. In case we cannot detect systemd through our ENVironment, nothing happens - and the ifRequired() factory method will return false.

Usage

<?php

use gipfl\SystemD\NotifySystemD;
use React\EventLoop\Factory as Loop;

$loop = Loop::create();
if ($notifier = NotifySystemD::ifRequired($loop)) {
    $notifier->setReady('My process is ready');
    $loop->addTimer(10, function () use ($notifier) {
        $notifier->setStatus('Process status changed');
    });
}

$loop->run();

Changes

v0.4.0

  • added a missing property to fix deprecation notices with PHP 8.2

v0.3.0

  • Notification socket has been moved to a dedicated class

v0.2.0

  • Add `has/getInvocationId()
  • Provide Getters for SocketPath and WatchdogInterval
  • Immediately fire the first Watchdog notification
  • Log eventual issues when sending Watchdog notifications
  • Allow to extend Watchdog timeout (v236+)

v0.1.0

  • First release

Naming

Yes, we know that it reads systemd and not SystemD - sorry for hurting your feelings. Unfortunately we released software depending on this library before we realized that we committed this error. We'll fix it once we move this to ipl or another namespace. Right now it isn't possible, as a transition from systemd to SystemD would lead to problems in a world with composer and PHP, with the latter being partially case insensitive.

统计信息

  • 总下载量: 13.92k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固