phpqd

Phpqd Docker Image

这是PHP队列守护进程的Docker基础镜像,是轻量框架,支持通过模块注册回调任务,实现模块间通信,内置日志、POSIX信号处理等辅助能力,可快速开发PHP守护程序并打包为容器。

下载次数: 0状态:社区镜像维护者:drmaxnix仓库类型:镜像最近更新:
下载命令
点击查看

Source Code: git.tjdev.de/DrMaxNix/phpqd

PHPQD

The PHP Queue Daemon Docker Base Image

What is PHPQD?

PHPQD, short for PHP Queue Daemon, is a powerful yet incredibly lightweight framework for writing daemon programs in PHP and shipping them as Docker Containers. PHPQD code is organized in modules, which can register tasks to be executed in the form of callbacks. Module intercommunication can be easily set up using the task queue or by utilizing the built-in event system (publish/subscribe pattern). Ready to use helpers for logging or working with POSIX signals allow for blazing fast development. And most importantly, PHPQD provides extremely detailed documentation and allows for pretty much every behavior to be customized to ensure full control at your fingertips.

Where to start

  • Read about PHPQD's Basic Concepts and Versioning
  • Follow the Hello World Tutorial
  • Tinker around with the Example Project

API Reference

  • Main — Module setup logic and main daemon loop

    • Main::quit — Quit the program
    • Main::mod — Get info for one or all modules
  • Log — Terminal output logging

    • Log::debug — Print a message with level "debug"
    • Log::info — Print a message with level "info"
    • Log::warn — Print a message with level "warn"
    • Log::error — Print a message with level "error" and optionally exit
    • Log::print — Print a message with custom metadata
    • Log::default_namespace_set — Set default namespace
    • Log::colors_enabled_set — Set whether colored output should be enabled
    • Log::is_colors_use — Get whether colored output should be used
  • Signal — Handle POSIX signals and dispatch them as events

    • Signal::enable — Enable handling of a signal
    • Signal::disable — Disable handling of a signal
  • Task — Task scheduler and event handler

    • Task::enqueue — Enqueue a new task
    • Task::dequeue — Dequeue a task
    • Task::event_dispatch — Dispatch an event
    • Task::hrtime_ms — Get milliseconds from system's high resolution time
  • Envconf — Read and verify configuration options from env variables

    • Envconf::get — Get value for one configuration option
    • Envconf::declare — Declare a configuration option of custom type
    • Envconf::declare_list — Declare a configuration option list of custom type
    • Envconf::declare_dict — Declare a configuration option dict of custom type
    • Envconf::declare_string — Declare a string configuration option
    • Envconf::declare_string_list — Declare a string list configuration option
    • Envconf::declare_string_dict — Declare a string dict configuration option
    • Envconf::declare_bool — Declare a boolean configuration option
    • Envconf::declare_bool_list — Declare a boolean list configuration option
    • Envconf::declare_bool_dict — Declare a boolean dict configuration option
    • Envconf::declare_int — Declare an integer configuration option
    • Envconf::declare_int_list — Declare an integer list configuration option
    • Envconf::declare_int_dict — Declare an integer dict configuration option
    • Envconf::declare_float — Declare a float configuration option
    • Envconf::declare_float_list — Declare a float list configuration option
    • Envconf::declare_float_dict — Declare a float dict configuration option
    • Envconf::declare_duration — Declare a duration configuration option
    • Envconf::declare_duration_list — Declare a duration list configuration option
    • Envconf::declare_duration_dict — Declare a duration dict configuration option
    • Envconf::process_bool — Convert and validate a string value as boolean
    • Envconf::process_int — Convert and validate a string value as integer
    • Envconf::process_float — Convert and validate a string value as float
    • Envconf::process_duration — Convert and validate a string value as duration

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 phpqd 镜像标签

docker pull docker.xuanyuan.run/drmaxnix/phpqd:<标签>

DockerHub 原生拉取命令

docker pull drmaxnix/phpqd:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告