imedge/systemd 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

imedge/systemd

最新稳定版本:v0.3.0

Composer 安装命令:

composer require imedge/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 IMEdge\systemd\systemd;
use Revolt\EventLoop;

systemd::notificationSocket()?->setReady('My process is ready');
EventLoop::delay(10, function () {
    systemd::notificationSocket()?->setReady('Process status changed');
})

Changes

v1.0.0

  • Changed namespace
  • Refactored completely, it's now PHP 8.1+ only and works with RevoltPHP (AMPHP and ReactPHP)

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-09