mirror of https://github.com/grpc/grpc.git
parent
cd336404e9
commit
cbe0f31e08
10 changed files with 420 additions and 50 deletions
@ -0,0 +1,68 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/messages.proto |
||||
|
||||
namespace Grpc\Testing\LoadBalancerStatsResponse; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>grpc.testing.LoadBalancerStatsResponse.RpcsByPeer</code> |
||||
*/ |
||||
class RpcsByPeer 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; |
||||
|
||||
/** |
||||
* 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. |
||||
* } |
||||
*/ |
||||
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; |
||||
} |
||||
|
||||
} |
||||
|
||||
// Adding a class alias for backwards compatibility with the previous class name. |
||||
class_alias(RpcsByPeer::class, \Grpc\Testing\LoadBalancerStatsResponse_RpcsByPeer::class); |
||||
|
@ -0,0 +1,16 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/messages.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
if (false) { |
||||
/** |
||||
* This class is deprecated. Use Grpc\Testing\LoadBalancerStatsResponse\RpcsByPeer instead. |
||||
* @deprecated |
||||
*/ |
||||
class LoadBalancerStatsResponse_RpcsByPeer {} |
||||
} |
||||
class_exists(LoadBalancerStatsResponse\RpcsByPeer::class); |
||||
@trigger_error('Grpc\Testing\LoadBalancerStatsResponse_RpcsByPeer is deprecated and will be removed in the next major release. Use Grpc\Testing\LoadBalancerStatsResponse\RpcsByPeer instead', E_USER_DEPRECATED); |
||||
|
@ -0,0 +1,66 @@ |
||||
<?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. |
||||
// |
||||
// An integration test service that covers all the method signature permutations |
||||
// of unary/streaming requests/responses. |
||||
// |
||||
namespace Grpc\Testing; |
||||
|
||||
/** |
||||
* A service to remotely control health status of an xDS test server. |
||||
*/ |
||||
class XdsUpdateHealthServiceClient 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\EmptyMessage $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
* @return \Grpc\Testing\EmptyMessage |
||||
*/ |
||||
public function SetServing(\Grpc\Testing\EmptyMessage $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.XdsUpdateHealthService/SetServing', |
||||
$argument, |
||||
['\Grpc\Testing\EmptyMessage', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* @param \Grpc\Testing\EmptyMessage $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
* @return \Grpc\Testing\EmptyMessage |
||||
*/ |
||||
public function SetNotServing(\Grpc\Testing\EmptyMessage $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.XdsUpdateHealthService/SetNotServing', |
||||
$argument, |
||||
['\Grpc\Testing\EmptyMessage', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue