20 lines
473 B
PHP
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)
|
||
|
]);
|
||
|
}
|
||
|
}
|