mirror of https://github.com/grpc/grpc.git
parent
d5dfb40823
commit
7ec6ad434f
87 changed files with 2046 additions and 935 deletions
@ -1,43 +0,0 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/echo.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class Echo |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce(); |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0aa6040a217372632f70726f746f2f677270632f74657374696e672f6563" . |
||||
"686f2e70726f746f120c677270632e74657374696e6732f6020a0f456368" . |
||||
"6f5465737453657276696365123d0a044563686f12192e677270632e7465" . |
||||
"7374696e672e4563686f526571756573741a1a2e677270632e7465737469" . |
||||
"6e672e4563686f526573706f6e736512480a0d5265717565737453747265" . |
||||
"616d12192e677270632e74657374696e672e4563686f526571756573741a" . |
||||
"1a2e677270632e74657374696e672e4563686f526573706f6e7365280112" . |
||||
"490a0e526573706f6e736553747265616d12192e677270632e7465737469" . |
||||
"6e672e4563686f526571756573741a1a2e677270632e74657374696e672e" . |
||||
"4563686f526573706f6e7365300112470a0a4269646953747265616d1219" . |
||||
"2e677270632e74657374696e672e4563686f526571756573741a1a2e6772" . |
||||
"70632e74657374696e672e4563686f526573706f6e73652801300112460a" . |
||||
"0d556e696d706c656d656e74656412192e677270632e74657374696e672e" . |
||||
"4563686f526571756573741a1a2e677270632e74657374696e672e456368" . |
||||
"6f526573706f6e736532620a18556e696d706c656d656e7465644563686f" . |
||||
"5365727669636512460a0d556e696d706c656d656e74656412192e677270" . |
||||
"632e74657374696e672e4563686f526571756573741a1a2e677270632e74" . |
||||
"657374696e672e4563686f526573706f6e7365320e0a0c4e6f5270635365" . |
||||
"7276696365620670726f746f33" |
||||
)); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,26 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/empty_service.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class EmptyService |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0a520a2a7372632f70726f746f2f677270632f74657374696e672f656d70" . |
||||
"74795f736572766963652e70726f746f120c677270632e74657374696e67" . |
||||
"320e0a0c456d70747953657276696365620670726f746f33" |
||||
), true); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -1,36 +0,0 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/metrics.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class Metrics |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0afb020a247372632f70726f746f2f677270632f74657374696e672f6d65" . |
||||
"74726963732e70726f746f120c677270632e74657374696e67226c0a0d47" . |
||||
"61756765526573706f6e7365120c0a046e616d6518012001280912140a0a" . |
||||
"6c6f6e675f76616c7565180220012803480012160a0c646f75626c655f76" . |
||||
"616c7565180320012801480012160a0c737472696e675f76616c75651804" . |
||||
"20012809480042070a0576616c7565221c0a0c4761756765526571756573" . |
||||
"74120c0a046e616d65180120012809220e0a0c456d7074794d6573736167" . |
||||
"6532a0010a0e4d6574726963735365727669636512490a0c476574416c6c" . |
||||
"476175676573121a2e677270632e74657374696e672e456d7074794d6573" . |
||||
"736167651a1b2e677270632e74657374696e672e4761756765526573706f" . |
||||
"6e7365300112430a084765744761756765121a2e677270632e7465737469" . |
||||
"6e672e4761756765526571756573741a1b2e677270632e74657374696e67" . |
||||
"2e4761756765526573706f6e7365620670726f746f33" |
||||
)); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -1,93 +0,0 @@ |
||||
<?php |
||||
// GENERATED CODE -- DO NOT EDIT! |
||||
|
||||
// Original file comments: |
||||
// Copyright 2015 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
namespace Grpc\Testing; |
||||
|
||||
/** |
||||
*/ |
||||
class EchoTestServiceClient extends \Grpc\BaseStub { |
||||
|
||||
/** |
||||
* @param string $hostname hostname |
||||
* @param array $opts channel options |
||||
* @param \Grpc\Channel $channel (optional) re-use channel object |
||||
*/ |
||||
public function __construct($hostname, $opts, $channel = null) { |
||||
parent::__construct($hostname, $opts, $channel); |
||||
} |
||||
|
||||
/** |
||||
* @param \Grpc\Testing\EchoRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function Echo(\Grpc\Testing\EchoRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.EchoTestService/Echo', |
||||
$argument, |
||||
['\Grpc\Testing\EchoResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function RequestStream($metadata = [], $options = []) { |
||||
return $this->_clientStreamRequest('/grpc.testing.EchoTestService/RequestStream', |
||||
['\Grpc\Testing\EchoResponse','decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* @param \Grpc\Testing\EchoRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function ResponseStream(\Grpc\Testing\EchoRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_serverStreamRequest('/grpc.testing.EchoTestService/ResponseStream', |
||||
$argument, |
||||
['\Grpc\Testing\EchoResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function BidiStream($metadata = [], $options = []) { |
||||
return $this->_bidiRequest('/grpc.testing.EchoTestService/BidiStream', |
||||
['\Grpc\Testing\EchoResponse','decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* @param \Grpc\Testing\EchoRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function Unimplemented(\Grpc\Testing\EchoRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.EchoTestService/Unimplemented', |
||||
$argument, |
||||
['\Grpc\Testing\EchoResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
} |
@ -1,51 +0,0 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/metrics.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Request message containing the gauge name |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.GaugeRequest</code> |
||||
*/ |
||||
class GaugeRequest extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
*/ |
||||
private $name = ''; |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Metrics::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
* @return string |
||||
*/ |
||||
public function getName() |
||||
{ |
||||
return $this->name; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setName($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->name = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -1,126 +0,0 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/metrics.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Response message containing the gauge name and value |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.GaugeResponse</code> |
||||
*/ |
||||
class GaugeResponse extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
*/ |
||||
private $name = ''; |
||||
protected $value; |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Metrics::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
* @return string |
||||
*/ |
||||
public function getName() |
||||
{ |
||||
return $this->name; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setName($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->name = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 long_value = 2;</code> |
||||
* @return int|string |
||||
*/ |
||||
public function getLongValue() |
||||
{ |
||||
return $this->readOneof(2); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 long_value = 2;</code> |
||||
* @param int|string $var |
||||
* @return $this |
||||
*/ |
||||
public function setLongValue($var) |
||||
{ |
||||
GPBUtil::checkInt64($var); |
||||
$this->writeOneof(2, $var); |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>double double_value = 3;</code> |
||||
* @return float |
||||
*/ |
||||
public function getDoubleValue() |
||||
{ |
||||
return $this->readOneof(3); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>double double_value = 3;</code> |
||||
* @param float $var |
||||
* @return $this |
||||
*/ |
||||
public function setDoubleValue($var) |
||||
{ |
||||
GPBUtil::checkDouble($var); |
||||
$this->writeOneof(3, $var); |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string string_value = 4;</code> |
||||
* @return string |
||||
*/ |
||||
public function getStringValue() |
||||
{ |
||||
return $this->readOneof(4); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string string_value = 4;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setStringValue($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->writeOneof(4, $var); |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* @return string |
||||
*/ |
||||
public function getValue() |
||||
{ |
||||
return $this->whichOneof("value"); |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,66 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/messages.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use UnexpectedValueException; |
||||
|
||||
/** |
||||
* The type of route that a client took to reach a server w.r.t. gRPCLB. |
||||
* The server must fill in "fallback" if it detects that the RPC reached |
||||
* the server via the "gRPCLB fallback" path, and "backend" if it detects |
||||
* that the RPC reached the server via "gRPCLB backend" path (i.e. if it got |
||||
* the address of this server from the gRPCLB server BalanceLoad RPC). Exactly |
||||
* how this detection is done is context and server dependent. |
||||
* |
||||
* Protobuf type <code>grpc.testing.GrpclbRouteType</code> |
||||
*/ |
||||
class GrpclbRouteType |
||||
{ |
||||
/** |
||||
* Server didn't detect the route that a client took to reach it. |
||||
* |
||||
* Generated from protobuf enum <code>GRPCLB_ROUTE_TYPE_UNKNOWN = 0;</code> |
||||
*/ |
||||
const GRPCLB_ROUTE_TYPE_UNKNOWN = 0; |
||||
/** |
||||
* Indicates that a client reached a server via gRPCLB fallback. |
||||
* |
||||
* Generated from protobuf enum <code>GRPCLB_ROUTE_TYPE_FALLBACK = 1;</code> |
||||
*/ |
||||
const GRPCLB_ROUTE_TYPE_FALLBACK = 1; |
||||
/** |
||||
* Indicates that a client reached a server as a gRPCLB-given backend. |
||||
* |
||||
* Generated from protobuf enum <code>GRPCLB_ROUTE_TYPE_BACKEND = 2;</code> |
||||
*/ |
||||
const GRPCLB_ROUTE_TYPE_BACKEND = 2; |
||||
|
||||
private static $valueToName = [ |
||||
self::GRPCLB_ROUTE_TYPE_UNKNOWN => 'GRPCLB_ROUTE_TYPE_UNKNOWN', |
||||
self::GRPCLB_ROUTE_TYPE_FALLBACK => 'GRPCLB_ROUTE_TYPE_FALLBACK', |
||||
self::GRPCLB_ROUTE_TYPE_BACKEND => 'GRPCLB_ROUTE_TYPE_BACKEND', |
||||
]; |
||||
|
||||
public static function name($value) |
||||
{ |
||||
if (!isset(self::$valueToName[$value])) { |
||||
throw new UnexpectedValueException(sprintf( |
||||
'Enum %s has no name defined for value %s', __CLASS__, $value)); |
||||
} |
||||
return self::$valueToName[$value]; |
||||
} |
||||
|
||||
|
||||
public static function value($name) |
||||
{ |
||||
$const = __CLASS__ . '::' . strtoupper($name); |
||||
if (!defined($const)) { |
||||
throw new UnexpectedValueException(sprintf( |
||||
'Enum %s has no value defined for name %s', __CLASS__, $name)); |
||||
} |
||||
return constant($const); |
||||
} |
||||
} |
||||
|
@ -0,0 +1,99 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/messages.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>grpc.testing.LoadBalancerStatsRequest</code> |
||||
*/ |
||||
class LoadBalancerStatsRequest extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Request stats for the next num_rpcs sent by client. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_rpcs = 1;</code> |
||||
*/ |
||||
protected $num_rpcs = 0; |
||||
/** |
||||
* If num_rpcs have not completed within timeout_sec, return partial results. |
||||
* |
||||
* Generated from protobuf field <code>int32 timeout_sec = 2;</code> |
||||
*/ |
||||
protected $timeout_sec = 0; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type int $num_rpcs |
||||
* Request stats for the next num_rpcs sent by client. |
||||
* @type int $timeout_sec |
||||
* If num_rpcs have not completed within timeout_sec, return partial results. |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* Request stats for the next num_rpcs sent by client. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_rpcs = 1;</code> |
||||
* @return int |
||||
*/ |
||||
public function getNumRpcs() |
||||
{ |
||||
return $this->num_rpcs; |
||||
} |
||||
|
||||
/** |
||||
* Request stats for the next num_rpcs sent by client. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_rpcs = 1;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setNumRpcs($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->num_rpcs = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* If num_rpcs have not completed within timeout_sec, return partial results. |
||||
* |
||||
* Generated from protobuf field <code>int32 timeout_sec = 2;</code> |
||||
* @return int |
||||
*/ |
||||
public function getTimeoutSec() |
||||
{ |
||||
return $this->timeout_sec; |
||||
} |
||||
|
||||
/** |
||||
* If num_rpcs have not completed within timeout_sec, return partial results. |
||||
* |
||||
* Generated from protobuf field <code>int32 timeout_sec = 2;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setTimeoutSec($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->timeout_sec = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,99 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/messages.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>grpc.testing.LoadBalancerStatsResponse</code> |
||||
*/ |
||||
class LoadBalancerStatsResponse extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* The number of completed RPCs for each peer. |
||||
* |
||||
* Generated from protobuf field <code>map<string, int32> rpcs_by_peer = 1;</code> |
||||
*/ |
||||
private $rpcs_by_peer; |
||||
/** |
||||
* The number of RPCs that failed to record a remote peer. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_failures = 2;</code> |
||||
*/ |
||||
protected $num_failures = 0; |
||||
|
||||
/** |
||||
* Constructor. |
||||
* |
||||
* @param array $data { |
||||
* Optional. Data for populating the Message object. |
||||
* |
||||
* @type array|\Google\Protobuf\Internal\MapField $rpcs_by_peer |
||||
* The number of completed RPCs for each peer. |
||||
* @type int $num_failures |
||||
* The number of RPCs that failed to record a remote peer. |
||||
* } |
||||
*/ |
||||
public function __construct($data = NULL) { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
parent::__construct($data); |
||||
} |
||||
|
||||
/** |
||||
* The number of completed RPCs for each peer. |
||||
* |
||||
* Generated from protobuf field <code>map<string, int32> rpcs_by_peer = 1;</code> |
||||
* @return \Google\Protobuf\Internal\MapField |
||||
*/ |
||||
public function getRpcsByPeer() |
||||
{ |
||||
return $this->rpcs_by_peer; |
||||
} |
||||
|
||||
/** |
||||
* The number of completed RPCs for each peer. |
||||
* |
||||
* Generated from protobuf field <code>map<string, int32> rpcs_by_peer = 1;</code> |
||||
* @param array|\Google\Protobuf\Internal\MapField $var |
||||
* @return $this |
||||
*/ |
||||
public function setRpcsByPeer($var) |
||||
{ |
||||
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT32); |
||||
$this->rpcs_by_peer = $arr; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* The number of RPCs that failed to record a remote peer. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_failures = 2;</code> |
||||
* @return int |
||||
*/ |
||||
public function getNumFailures() |
||||
{ |
||||
return $this->num_failures; |
||||
} |
||||
|
||||
/** |
||||
* The number of RPCs that failed to record a remote peer. |
||||
* |
||||
* Generated from protobuf field <code>int32 num_failures = 2;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setNumFailures($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->num_failures = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -1,69 +0,0 @@ |
||||
<?php |
||||
// GENERATED CODE -- DO NOT EDIT! |
||||
|
||||
// Original file comments: |
||||
// Copyright 2015-2016 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
// Contains the definitions for a metrics service and the type of metrics |
||||
// exposed by the service. |
||||
// |
||||
// Currently, 'Gauge' (i.e a metric that represents the measured value of |
||||
// something at an instant of time) is the only metric type supported by the |
||||
// service. |
||||
namespace Grpc\Testing; |
||||
|
||||
/** |
||||
*/ |
||||
class MetricsServiceClient extends \Grpc\BaseStub { |
||||
|
||||
/** |
||||
* @param string $hostname hostname |
||||
* @param array $opts channel options |
||||
* @param \Grpc\Channel $channel (optional) re-use channel object |
||||
*/ |
||||
public function __construct($hostname, $opts, $channel = null) { |
||||
parent::__construct($hostname, $opts, $channel); |
||||
} |
||||
|
||||
/** |
||||
* Returns the values of all the gauges that are currently being maintained by |
||||
* the service |
||||
* @param \Grpc\Testing\EmptyMessage $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function GetAllGauges(\Grpc\Testing\EmptyMessage $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_serverStreamRequest('/grpc.testing.MetricsService/GetAllGauges', |
||||
$argument, |
||||
['\Grpc\Testing\GaugeResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* Returns the value of one gauge |
||||
* @param \Grpc\Testing\GaugeRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function GetGauge(\Grpc\Testing\GaugeRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.MetricsService/GetGauge', |
||||
$argument, |
||||
['\Grpc\Testing\GaugeResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
} |
@ -1,30 +0,0 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/empty.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* An empty message that you can re-use to avoid defining duplicated empty |
||||
* messages in your project. A typical example is to use it as argument or the |
||||
* return value of a service API. For instance: |
||||
* service Foo { |
||||
* rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; |
||||
* }; |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.Empty</code> |
||||
*/ |
||||
class PBEmpty extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\GPBEmpty::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
} |
||||
|
Loading…
Reference in new issue