承接 dply/fleet-operator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

dply/fleet-operator

Composer 安装命令:

composer require dply/fleet-operator

包简介

PHP middleware, config, and OpenAPI spec for Fleet Console operator APIs (GET …/summary and …/readme).

README 文档

README

Repository: github.com/shaferllc/fleet-operator
Composer package: dply/fleet-operator · PHP ^8.4

Shared middleware, config, and OpenAPI for applications that expose a Fleet Console–compatible operator API:

  • GET {prefix}/summary — JSON snapshot (see Summary fields below); extra keys are stored and can drive FLEET_ALERT_METRIC_RULES
  • GET {prefix}/readme — JSON with required content (Markdown is typical); optional format, title, subtitle

Fleet Console polls summary and may open readme in the UI. Set FLEET_OPERATOR_TOKEN on this app and store the same secret for that service in Fleet Console (Console → Services → operator token for that row).

Should I use this package?

Use it Skip it
Many services, want one auth + contract Single app, two routes already done
Want a published OpenAPI file per release Only internal docs in a wiki
Semver when response/auth rules evolve API never changes

GitHub Actions

  • On shaferllc/fleet-operator: workflow CI lives at .github/workflows/ci.yml on the default branch (main). Open ActionsCI — you should see runs on each push/PR. Use Run workflow if you add workflow_dispatch (included in this repo) to run without a new commit.
  • Release: .github/workflows/release.yml creates a GitHub Release when you push a tag v1.2.3 or run the workflow with a version. That file must exist on the package repo (push it if you only see CI in the Actions sidebar).
  • Fleet Console monorepo: GitHub does not run YAML under fleet-operator/.github/ for the parent repo. Use the monorepo root workflow package-fleet-operator.yml (path filter fleet-operator/**) — or Actions → Run workflow after enabling workflow_dispatch on that file.

Install

composer require dply/fleet-operator

Optional: publish bundled config and OpenAPI into your project when your stack supports tagged package publishing (tags fleet-operator-config and fleet-operator-openapi).

Set in .env:

FLEET_OPERATOR_TOKEN=your-long-random-secret

Wire HTTP routes (you choose the prefix)

Typical prefixes are api/operator or api/v1/operator.

Apply AuthenticateFleetOperator to the routes that serve your operator summary and readme endpoints. Example — adapt to your router and controllers:

<?php

use Dply\FleetOperator\Http\Middleware\AuthenticateFleetOperator;

// Pseudocode: attach AuthenticateFleetOperator::class to GET .../summary and GET .../readme

Return JSON bodies (or your framework’s JSON response type) from those handlers.

Summary fields (all optional)

Fleet Console renders these when present (still accepts any other JSON):

Field Type Purpose
app / service string Service id on the card
version string / number Release label
git_sha / commit string VCS revision (short hash shown)
runtime / php_version string Runtime line
uptime_seconds int Uptime (formatted)
region string or string[] Region label(s)
deployed_at / build_at string Deploy / build time
environment, generated_at, users, organizations various Existing dashboard tiles
notes / status_message string Highlighted status strip
links object Map of label → https URL (link chips)
dependencies array { name, ok?, healthy?, detail? } rows
metrics object Extra counters (key/value grid)

Readme JSON shape

Fleet’s README view expects JSON similar to:

{
  "format": "markdown",
  "title": "My product",
  "subtitle": "Internal runbook",
  "content": "# Hello\n\n"
}

content must be a string (can be empty). title / subtitle override or augment the README page header in Fleet Console.

Versioning

Follow SemVer. Bump minor when adding optional JSON fields; major if auth or required response shapes break consumers.

Packagist

Install name: dply/fleet-operator — not fleetphp/fleet-operator.

If Packagist still shows the old vendor, the registry entry was never updated: Packagist package names come from maintainer actions, not from this repo alone.

  1. Open Submit package and submit your Git repo if dply/fleet-operator is missing.
  2. If fleetphp/fleet-operator is your package and pointed at this same repository, either:
    • Abandon it on Packagist (set replacement to dply/fleet-operator), then ensure dply/fleet-operator is submitted; or
    • Contact Packagist support if you need the old name removed so the URL can attach to the new package name.
  3. Ensure the GitHub/GitLab integration (webhook or “Update”) has run so Packagist reads the current composer.json (name must be dply/fleet-operator).

composer.json includes "replace": { "fleetphp/fleet-operator": "*" } so projects that still list the old name can resolve the replacement when both are visible to Composer (e.g. after you abandon with a replacement, or while migrating).

Repository layout

The canonical Git remote is github.com/shaferllc/fleet-operator (this tree is the package root there).

  • CI: .github/workflows/ci.yml runs PHPUnit on PHP 8.4 and 8.5 on pushes and PRs to that repository.
  • Releases: Tag v1.2.3 on shaferllc/fleet-operator (workflow Release in this package repo, or push the tag manually). Packagist reads from that Git URL.

Fleet Console (the dashboard app monorepo, if you use one) may still vendor a copy under fleet-operator/ with a Composer path repository for local development. Sync that directory from this repo when needed, or depend on dply/fleet-operator via VCS:

"repositories": [
    { "type": "vcs", "url": "https://github.com/shaferllc/fleet-operator" }
],
"require": {
    "dply/fleet-operator": "^1.0"
}

License

MIT

dply/fleet-operator 适用场景与选型建议

dply/fleet-operator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「http」 「operator」 「monitoring」 「middleware」 「openapi」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 dply/fleet-operator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dply/fleet-operator 我们能提供哪些服务?
定制开发 / 二次开发

基于 dply/fleet-operator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 35
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-25