xenolope/grizzwald
Composer 安装命令:
composer require xenolope/grizzwald
包简介
A client library to interact with the CoreOS fleet API
README 文档
README
"Grizz was in the Navy" - Tracy Jordan, 30 Rock (S01E01: The Aftermath)
Description
Grizzwald is a simple PHP library that interacts with the CoreOS fleet API, for easy management of your cluster's unit files.
Installation
The library can be installed with Composer, by including the following in your composer.json:
{
"require": {
"xenolope/grizzwald": "~1.0"
}
}
Usage
// Create a new instance of the client, passing in the base URL to your fleet instance $client = new FleetClient('http://172.16.1.100:49153'); // Get a list of all the machines in the cluster $machines = $client->listMachines(); // Returns an array of \Xenolope\Grizzwald\Entity\Machine objects // Get a list of all the unit states in the cluster $states = $client->listUnitStates(); // Returns an array of \Xenolope\Grizzwald\Entity\UnitState objects // Get a list of all the units in the cluster $units = $client->listUnits(); // Returns an array of \Xenolope\Grizzwald\Entity\Unit objects // Get a single unit from the cluster $unit = $client->getUnit('nginx.service'); // Returns a \Xenolope\Grizzwald\Entity\Unit object // Create a new unit on the cluster $unit = new Unit('nginx.service', [ new UnitOption('Service', 'ExecStart', '/usr/sbin/nginx') // One or more UnitOptions are required ], Unit::STATE_LAUNCHED); $client->createUnit($unit); // Modify an existing unit on the cluster $unit = new Unit('nginx.service', Unit::STATE_LOADED); $client->modifyUnit($unit); // Destroy a unit on the cluster $client->destroyUnit('nginx.service');
License
Grizzwald is released under the MIT License; please see LICENSE for more information.
xenolope/grizzwald 适用场景与选型建议
xenolope/grizzwald 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13 次下载、GitHub Stars 达 1, 最近一次更新时间为 2015 年 08 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 xenolope/grizzwald 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 xenolope/grizzwald 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-11