krisell/startup-slack-notification-laravel
Composer 安装命令:
composer require krisell/startup-slack-notification-laravel
包简介
Adds a command to send a startup notification on slack.
README 文档
README
This package adds a command, startup-notification:slack which sends a startup-notification to slack to inform you when the server is started. This is useful during a deploy to get a notification when the deployment has been completed, during horizontal scaling to be notified when new servers are started, and to be notified if your server is restarted for unexpected reasons.
Installation
Add the package to your Laravel project.
composer require krisell/startup-slack-notification-laravel
The package is configured for automatic discovery, so unless you have other settings, you do not need to manually add the service provider.
Usage
Add your slack hook, either to the .env-variable STARTUP_SLACK_HOOK= or by publishing the configuration (using php artisan vendor:publish) and setting the slack_hook config value.
Run the command startup-notification:slack during server boot.
Defining custom data
You can optionally define custom data to be sent along the notification in services.startup-slack-notification.data. Any key-value pairs added there will be sent along with the Slack notification.
Testing an actual message
One of the tests is prepared to send an acutal slack message. To run this test, create a .hook-file in the /tests directory and set the contents to a slack hook URL. Alternatively, you may add the STARTUP_SLACK_HOOK env value to phpunit.xml.dist.
All other tests mock the actual sending of the notification, and instead makes assertions on the contents before transmission.
Licence
MIT
Author
Martin Krisell (martin.krisell@gmail.com)
krisell/startup-slack-notification-laravel 适用场景与选型建议
krisell/startup-slack-notification-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9.25k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 11 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 krisell/startup-slack-notification-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 krisell/startup-slack-notification-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 9.25k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-11-24