laravel-template/app/Services/PingerService.php

20 lines
473 B
PHP
Raw Normal View History

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