feat[contract]: add basic storage interface for testing integration
This commit is contained in:
parent
c257e58ecb
commit
74e072d8bc
2 changed files with 18 additions and 3 deletions
|
@ -4,10 +4,15 @@ declare(strict_types=1);
|
|||
|
||||
namespace Quintolin\Core;
|
||||
|
||||
final class HealthCheck
|
||||
final readonly class HealthCheck
|
||||
{
|
||||
public function __invoke(): bool
|
||||
public function __construct(private StorageHealthCheckInterface $storageHealthCheck) {}
|
||||
|
||||
public function __invoke(): array
|
||||
{
|
||||
return true;
|
||||
return [
|
||||
'core' => true,
|
||||
'storage' => ($this->storageHealthCheck)(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
10
src/StorageHealthCheckInterface.php
Normal file
10
src/StorageHealthCheckInterface.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Quintolin\Core;
|
||||
|
||||
interface StorageHealthCheckInterface
|
||||
{
|
||||
public function __invoke(): mixed;
|
||||
}
|
Loading…
Reference in a new issue