20 lines
356 B
PHP
20 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;
|
||
|
|
}
|