braune-digital/pitcher
最新稳定版本:1.0.0
Composer 安装命令:
composer require braune-digital/pitcher
包简介
Pitcher Library
README 文档
README
Pitcher App (http://www.pitcher-app.com) is a webservice which allows you to easily send exceptions from your project. In contrast to classical monitoring webservices, Pitcher is able to pitch individual exceptions from projects, where Pitcher is acting like a satellite which communicates whith ground control. Register now at pitcher-app.com and create your project. After receiving the secret, the next step is installing the PHP component (or Bundle in case of using Symfony) and linking the satellite by defining the secret.
This PHP component allows you to send notifications through different channels (iOS Push Notification, E-Mail or WAMP Websocket).
Integrations
Currently there´s a bundle for Symfony which integrates the component as a service (https://github.com/braune-digital/BrauneDigitalPitcherBundle).
Installation
Install the package with composer into your project:
composer require braune-digital/pitcher "^1.0"
Usage
The BaseClient implements the ClientInterface and allows you to pitch exceptions with GuzzleHTTP to the Pitcher App.
<?php namespace BrauneDigital\Pitcher\Client; use Psr\Log\LoggerInterface; interface ClientInterface { /** * @param $level * @param $message * @return mixed */ public function pitch($level, $message); /** * @return mixed */ public function getLogger(); /** * @param LoggerInterface $ * @return mixed */ public function setLogger(LoggerInterface $logger); }
You can use this BaseClient and pitch messages:
$client = new \BrauneDigital\Pitcher\Client\BaseClient('SATELLITE_NAME', 'SECRET'); $client->pitch(\BrauneDigital\Pitcher\Notification\Notification::LEVEL_CRITICAL, 'XML API from server B is down');
The Pitcher App returns a JSON-Reponse:
{"success":true,"payload":{"level":"critical","message":"XML API from server B is down","date":"2016-04-13T13:23:15+0200","satellite":"YOU_ARE_FREE_TO_CHOOSE_A_NAME","checked":false,"id":141},"errors":[]}
Now you will get notifications from the Pitcher app. You can define notification channels in your user profile at http://www.pitcher-app.com/#/login.
braune-digital/pitcher 适用场景与选型建议
braune-digital/pitcher 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14.05k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 04 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「pitcher bundle watch health check notification exeption」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 braune-digital/pitcher 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 braune-digital/pitcher 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 braune-digital/pitcher 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Library to execute code when a file changes
2lenet/EasyAdminPlusBundle
The bundle for easy using json-rpc api on your project
Pitcher bundle
Provide a way to secure accesses to all routes of an symfony application.
DMS Meetup API Bundle, enables Meetup API clients in services
统计信息
- 总下载量: 14.05k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 25
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-04-12