summaryrefslogtreecommitdiff
path: root/tests/plugins/grpc/php_server
diff options
context:
space:
mode:
Diffstat (limited to 'tests/plugins/grpc/php_server')
-rw-r--r--tests/plugins/grpc/php_server/.rr.yaml22
-rw-r--r--tests/plugins/grpc/php_server/composer.json23
-rw-r--r--tests/plugins/grpc/php_server/server.crt15
-rw-r--r--tests/plugins/grpc/php_server/server.key9
-rw-r--r--tests/plugins/grpc/php_server/service.proto11
-rw-r--r--tests/plugins/grpc/php_server/src/EchoService.php17
-rw-r--r--tests/plugins/grpc/php_server/src/GPBMetadata/Service.php27
-rw-r--r--tests/plugins/grpc/php_server/src/Service/EchoInterface.php22
-rw-r--r--tests/plugins/grpc/php_server/src/Service/Message.php58
-rw-r--r--tests/plugins/grpc/php_server/worker-grpc.php26
10 files changed, 0 insertions, 230 deletions
diff --git a/tests/plugins/grpc/php_server/.rr.yaml b/tests/plugins/grpc/php_server/.rr.yaml
deleted file mode 100644
index cc4a9300..00000000
--- a/tests/plugins/grpc/php_server/.rr.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
-grpc:
- listen: "tcp://:9001"
- proto: "service.proto"
- tls:
- key: "server.key"
- cert: "server.crt"
- workers:
- command: "php worker.php"
- pool:
- numWorkers: 4
-
-metrics:
- address: localhost:2112
-
-limit:
- interval: 1
- services:
- grpc:
- maxMemory: 100
- TTL: 0
- idleTTL: 0
- execTTL: 60 \ No newline at end of file
diff --git a/tests/plugins/grpc/php_server/composer.json b/tests/plugins/grpc/php_server/composer.json
deleted file mode 100644
index b6303291..00000000
--- a/tests/plugins/grpc/php_server/composer.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "name": "app/example-grpc-server",
- "description": "Example GRPC Server",
- "repositories": [
- {
- "type": "path",
- "url": "../.."
- }
- ],
- "require": {
- "spiral/php-grpc": "*"
- },
- "require-dev": {
- "grpc/grpc": "^1.36"
- },
- "autoload": {
- "psr-4": {
- "": "src"
- }
- },
- "minimum-stability": "dev",
- "prefer-stable": true
-}
diff --git a/tests/plugins/grpc/php_server/server.crt b/tests/plugins/grpc/php_server/server.crt
deleted file mode 100644
index 24d67fd7..00000000
--- a/tests/plugins/grpc/php_server/server.crt
+++ /dev/null
@@ -1,15 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICTTCCAdOgAwIBAgIJAOKyUd+llTRKMAoGCCqGSM49BAMCMGMxCzAJBgNVBAYT
-AlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2Nv
-MRMwEQYDVQQKDApSb2FkUnVubmVyMRIwEAYDVQQDDAlsb2NhbGhvc3QwHhcNMTgw
-OTMwMTMzNDUzWhcNMjgwOTI3MTMzNDUzWjBjMQswCQYDVQQGEwJVUzETMBEGA1UE
-CAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzETMBEGA1UECgwK
-Um9hZFJ1bm5lcjESMBAGA1UEAwwJbG9jYWxob3N0MHYwEAYHKoZIzj0CAQYFK4EE
-ACIDYgAEVnbShsM+l5RR3wfWWmGhzuFGwNzKCk7i9xyobDIyBUxG/UUSfj7KKlUX
-puDnDEtF5xXcepl744CyIAYFLOXHb5WqI4jCOzG0o9f/00QQ4bQudJOdbqV910QF
-C2vb7Fxro1MwUTAdBgNVHQ4EFgQU9xUexnbB6ORKayA7Pfjzs33otsAwHwYDVR0j
-BBgwFoAU9xUexnbB6ORKayA7Pfjzs33otsAwDwYDVR0TAQH/BAUwAwEB/zAKBggq
-hkjOPQQDAgNoADBlAjEAue3HhR/MUhxoa9tSDBtOJT3FYbDQswrsdqBTz97CGKst
-e7XeZ3HMEvEXy0hGGEMhAjAqcD/4k9vViVppgWFtkk6+NFbm+Kw/QeeAiH5FgFSj
-8xQcb+b7nPwNLp3JOkXkVd4=
------END CERTIFICATE-----
diff --git a/tests/plugins/grpc/php_server/server.key b/tests/plugins/grpc/php_server/server.key
deleted file mode 100644
index 7501dd46..00000000
--- a/tests/plugins/grpc/php_server/server.key
+++ /dev/null
@@ -1,9 +0,0 @@
------BEGIN EC PARAMETERS-----
-BgUrgQQAIg==
------END EC PARAMETERS-----
------BEGIN EC PRIVATE KEY-----
-MIGkAgEBBDCQP8utxNbHR6xZOLAJgUhn88r6IrPqmN0MsgGJM/jePB+T9UhkmIU8
-PMm2HeScbcugBwYFK4EEACKhZANiAARWdtKGwz6XlFHfB9ZaYaHO4UbA3MoKTuL3
-HKhsMjIFTEb9RRJ+PsoqVRem4OcMS0XnFdx6mXvjgLIgBgUs5cdvlaojiMI7MbSj
-1//TRBDhtC50k51upX3XRAULa9vsXGs=
------END EC PRIVATE KEY-----
diff --git a/tests/plugins/grpc/php_server/service.proto b/tests/plugins/grpc/php_server/service.proto
deleted file mode 100644
index 60ff84a9..00000000
--- a/tests/plugins/grpc/php_server/service.proto
+++ /dev/null
@@ -1,11 +0,0 @@
-syntax = "proto3";
-package service;
-
-service Echo {
- rpc Ping (Message) returns (Message) {
- }
-}
-
-message Message {
- string msg = 1;
-} \ No newline at end of file
diff --git a/tests/plugins/grpc/php_server/src/EchoService.php b/tests/plugins/grpc/php_server/src/EchoService.php
deleted file mode 100644
index c2707811..00000000
--- a/tests/plugins/grpc/php_server/src/EchoService.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/**
- * Sample GRPC PHP server.
- */
-
-use Spiral\GRPC\ContextInterface;
-use Service\EchoInterface;
-use Service\Message;
-
-class EchoService implements EchoInterface
-{
- public function Ping(ContextInterface $ctx, Message $in): Message
- {
- $out = new Message();
- return $out->setMsg(strtoupper($in->getMsg()));
- }
-} \ No newline at end of file
diff --git a/tests/plugins/grpc/php_server/src/GPBMetadata/Service.php b/tests/plugins/grpc/php_server/src/GPBMetadata/Service.php
deleted file mode 100644
index c1b65b21..00000000
--- a/tests/plugins/grpc/php_server/src/GPBMetadata/Service.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: service.proto
-
-namespace GPBMetadata;
-
-class Service
-{
- public static $is_initialized = false;
-
- public static function initOnce() {
- $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
-
- if (static::$is_initialized == true) {
- return;
- }
- $pool->internalAddGeneratedFile(hex2bin(
- "0a6e0a0d736572766963652e70726f746f12077365727669636522160a07" .
- "4d657373616765120b0a036d736718012001280932340a044563686f122c" .
- "0a0450696e6712102e736572766963652e4d6573736167651a102e736572" .
- "766963652e4d6573736167652200620670726f746f33"
- ));
-
- static::$is_initialized = true;
- }
-}
-
diff --git a/tests/plugins/grpc/php_server/src/Service/EchoInterface.php b/tests/plugins/grpc/php_server/src/Service/EchoInterface.php
deleted file mode 100644
index 5f336ace..00000000
--- a/tests/plugins/grpc/php_server/src/Service/EchoInterface.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-# Generated by the protocol buffer compiler (spiral/grpc). DO NOT EDIT!
-# source: service.proto
-
-namespace Service;
-
-use Spiral\GRPC;
-
-interface EchoInterface extends GRPC\ServiceInterface
-{
- // GRPC specific service name.
- public const NAME = "service.Echo";
-
- /**
- * @param GRPC\ContextInterface $ctx
- * @param Message $in
- * @return Message
- *
- * @throws GRPC\Exception\InvokeException
- */
- public function Ping(GRPC\ContextInterface $ctx, Message $in): Message;
-}
diff --git a/tests/plugins/grpc/php_server/src/Service/Message.php b/tests/plugins/grpc/php_server/src/Service/Message.php
deleted file mode 100644
index 6c40c879..00000000
--- a/tests/plugins/grpc/php_server/src/Service/Message.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: service.proto
-
-namespace Service;
-
-use Google\Protobuf\Internal\GPBType;
-use Google\Protobuf\Internal\RepeatedField;
-use Google\Protobuf\Internal\GPBUtil;
-
-/**
- * Generated from protobuf message <code>service.Message</code>
- */
-class Message extends \Google\Protobuf\Internal\Message
-{
- /**
- * Generated from protobuf field <code>string msg = 1;</code>
- */
- private $msg = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $msg
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Service::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Generated from protobuf field <code>string msg = 1;</code>
- * @return string
- */
- public function getMsg()
- {
- return $this->msg;
- }
-
- /**
- * Generated from protobuf field <code>string msg = 1;</code>
- * @param string $var
- * @return $this
- */
- public function setMsg($var)
- {
- GPBUtil::checkString($var, True);
- $this->msg = $var;
-
- return $this;
- }
-
-}
-
diff --git a/tests/plugins/grpc/php_server/worker-grpc.php b/tests/plugins/grpc/php_server/worker-grpc.php
deleted file mode 100644
index 683a2341..00000000
--- a/tests/plugins/grpc/php_server/worker-grpc.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/**
- * Sample GRPC PHP server.
- */
-
-use Service\EchoInterface;
-use Spiral\Goridge\StreamRelay;
-use Spiral\GRPC\Server;
-use Spiral\RoadRunner\Worker;
-
-require __DIR__ . '/vendor/autoload.php';
-
-$server = new Server(null, [
- 'debug' => false, // optional (default: false)
-]);
-
-$server->registerService(EchoInterface::class, new EchoService());
-
-$worker = \method_exists(Worker::class, 'create')
- // RoadRunner >= 2.x
- ? Worker::create()
- // RoadRunner 1.x
- : new Worker(new StreamRelay(STDIN, STDOUT))
-;
-
-$server->serve($worker);