feat[contract]: add basic storage interface for testing integration

This commit is contained in:
Krzysztof Sikorski 2024-05-06 03:32:24 +02:00
parent c257e58ecb
commit 74e072d8bc
Signed by: krzysztof-sikorski
GPG key ID: 4EB564BD08FE8476
2 changed files with 18 additions and 3 deletions

View file

@ -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)(),
];
}
}

View file

@ -0,0 +1,10 @@
<?php
declare(strict_types=1);
namespace Quintolin\Core;
interface StorageHealthCheckInterface
{
public function __invoke(): mixed;
}