laravel-template/app/Services/PingerService.php

20 lines
442 B
PHP
Raw Permalink Normal View History

2023-11-01 04:02:17 +00:00
<?php
namespace App\Services;
2023-11-02 13:03:39 +00:00
use App\Services\gRPC\Pinger\PingerInterface;
2023-11-01 04:02:17 +00:00
use App\Services\gRPC\Pinger\PingRequest;
use App\Services\gRPC\Pinger\PingResponse;
use Spiral\RoadRunner\GRPC\ContextInterface;
class PingerService implements PingerInterface
{
public function ping(ContextInterface $ctx, PingRequest $in): PingResponse
2023-11-02 13:03:39 +00:00
{
2023-11-01 04:02:17 +00:00
return new PingResponse([
'status_code' => rand(200, 500)
]);
}
2023-11-02 13:03:39 +00:00
}