laravel-template/app/Services/PingerService.php
2023-11-01 12:02:17 +08:00

20 lines
473 B
PHP

<?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)
]);
}
}