myena/php-rgw-api
Composer 安装命令:
composer require myena/php-rgw-api
包简介
PHP Client for the Rados Gateway API that doesn't suck
README 文档
README
This lib aims to be a comprehensive PHP SDK for the Rados Gateway Admin API.
Installation
This lib is designed to be installed using Composer
{
"require": {
"myena/php-rgw-api": "4.*"
}
}
Features
- All object-containing responses are modeled (list)
- Entire request chain is fully modeled, with required parameters being type-hinted (e.g. UserRootLink::Info)
- All models have full swagger-php markup
- Includes undocumented
/metadataendpoints - Parameter validation (link) with hopefully useful error messages
Usage Basics
More details on each component can be found below, however here is a quick fill-in-the-blank example:
$config = new \MyENA\RGW\Config([ 'address' => '', 'adminPath' => '', 'apiKey' => '', 'apiSecret' => '', ]); $client = new \MyENA\RGW\Client($config, new \MyENA\RGW\Signature\V2Signature()); [$users, $err] = $client->Metadata()->User()->List()->execute(); if (null !== $err) { die((string)$err); } var_dump($users); // and whatever else you wanna do...
Advanced Config
You must first construct a Config:
$config = new \MyENA\RGW\Config([ 'address' => '', // REQUIRED 'apiKey' => '', // REQUIRED 'apiSecret' => '', // REQUIRED 'adminPath' => '', // optional, whatever your admin ops path is 'silent' => false // optional, silences all logging ]);
Custom Guzzle Client
The optional 2nd argument in the Config constructor accepts any object implementing the Guzzle ClientInterface. If left null, a new Guzzle Client with no options will be constructed.
Custom Logger
The optional 3rd argument in the Config constructor accepts any object implementing the Psr LoggerInterface. If left null, a new Psr NullLogger will be constructed.
myena/php-rgw-api 适用场景与选型建议
myena/php-rgw-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6.92k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2018 年 06 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 myena/php-rgw-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 myena/php-rgw-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 6.92k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MPL-2.0
- 更新时间: 2018-06-14