illuma-law/healthcheck-mercure
最新稳定版本:v0.1.4
Composer 安装命令:
composer require illuma-law/healthcheck-mercure
包简介
Focused mercure health check for Spatie's Laravel Health package.
README 文档
README
A focused mercure health check for Spatie's Laravel Health package.
This package provides a simple, direct health check to verify that your application's Mercure hub is reachable and responding to HTTP requests.
Features
- Reachability Check: Verifies that your Laravel application can successfully connect to the configured Mercure hub URL.
- HTTP Status Validation: Ensures the Mercure hub returns a successful HTTP status code (2xx).
- Configurable Timeout: Respects your configured timeout settings to prevent the health check from hanging.
Installation
Require this package with composer:
composer require illuma-law/healthcheck-mercure
Usage & Integration
Register the check inside your application's health service provider (e.g. AppServiceProvider or a dedicated HealthServiceProvider), alongside your other Spatie Laravel Health checks:
Basic Registration
use IllumaLaw\HealthCheckMercure\MercureCheck; use Spatie\Health\Facades\Health; Health::checks([ MercureCheck::new(), ]);
Expected Result States
The check interacts with the Spatie Health dashboard and JSON endpoints using these states:
- Ok: Mercure hub is reachable and returned a 2xx status code.
- Failed: Mercure hub was unreachable, timed out, or returned an error status code (4xx/5xx).
Testing
Run the test suite:
composer test
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 33
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-20