bowero/laravel-healthchecks
Composer 安装命令:
composer require bowero/laravel-healthchecks
包简介
A Laravel wrapper for healthchecks.io
README 文档
README
Healthchecks.io is a service that monitors your cron jobs and alerts you when they are down. This package is a wrapper for the Healthchecks.io API.
Installation
You can install the package via composer:
composer require bowero/laravel-healthchecks
You then need to publish the configuration file:
php artisan vendor:publish --tag="laravel-healthchecks-config"
This is the contents of the published config file:
return [ /* * The URL endpoint of healthchecks.io */ 'url' => 'https://hc-ping.com/', /* * Your registered jobs */ 'jobs' => [ 'my-first-check' => [ 'uuid' => 'c2c0be0a-94fa-4128-aa8a-cd55889cdb29', ], ], ];
That's it! you can now use the package in your Laravel application. It is automatically registered in your service provider.
Usage
use Bowero\Healthchecks\Facades\Healthchecks; /* * Create a job * (the job is registered in healthchecks.php) */ $job = Healthchecks::job('my-first-check'); /* * Create a job based on the uuid */ $job = Healthchecks::uuid('c2c0be0a-94fa-4128-aa8a-cd55889cdb29'); /* * Mark the job as started */ $job->start(); /* * Mark the job as succesful */ $job->success(); /* * Mark the job as failed */ $job->failure(); /* * Mark the job as exited with a status code */ $job->exitWithStatus(1);
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 74
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-09