illuma-law/healthcheck-storage
最新稳定版本:v0.1.4
Composer 安装命令:
composer require illuma-law/healthcheck-storage
包简介
Focused storage health check for Spatie's Laravel Health package.
README 文档
README
A focused storage health check for Spatie's Laravel Health package.
This package provides a direct health check to verify that your configured storage disks (local, S3, etc.) are actually writable by the application.
Features
- Write-Read-Delete Cycle: Performs a complete cycle (write small file, read it back, delete it) to ensure full disk operationality.
- Multi-Disk Support: Monitor multiple disks at once (defaults to
localandpublic). - Performance Tracking: Reports the latency of the storage operations for each disk in the health meta data.
Installation
Require this package with composer:
composer require illuma-law/healthcheck-storage
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\HealthCheckStorage\StorageDiskWritabilityCheck; use Spatie\Health\Facades\Health; Health::checks([ StorageDiskWritabilityCheck::new() ->disks(['local', 'public', 's3']), ]);
Expected Result States
The check interacts with the Spatie Health dashboard and JSON endpoints using these states:
- Ok: All probed disks successfully completed the write-read-delete cycle.
- Skipped: No valid disks were configured or found to probe.
- Failed: One or more disks failed to write, read back, or delete the probe file.
Testing
Run the test suite:
composer test
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 32
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-20