lthn.io/app/Mod/Chain/Contracts/HealthCheckable.php
Claude b4e4766e01
feat: HealthCheckable interface on DaemonRpc and WalletRpc
Services implement healthCheck() returning {status, detail, stale?}.
Status page refactored to use healthCheck() instead of ad-hoc checks.
Statuses: healthy, degraded (stale data), unhealthy (unreachable).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 11:43:01 +01:00

19 lines
356 B
PHP

<?php
declare(strict_types=1);
namespace Mod\Chain\Contracts;
/**
* Service health check interface.
*
* $result = $service->healthCheck();
* if ($result['status'] === 'healthy') { ... }
*/
interface HealthCheckable
{
/**
* @return array{status: string, detail: string, stale?: bool}
*/
public function healthCheck(): array;
}