| 1 |
<?php |
| 2 |
// GENERATED CODE -- DO NOT EDIT! |
| 3 |
|
| 4 |
// Original file comments: |
| 5 |
// Copyright 2015 gRPC authors. |
| 6 |
// |
| 7 |
// Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 |
// you may not use this file except in compliance with the License. |
| 9 |
// You may obtain a copy of the License at |
| 10 |
// |
| 11 |
// http://www.apache.org/licenses/LICENSE-2.0 |
| 12 |
// |
| 13 |
// Unless required by applicable law or agreed to in writing, software |
| 14 |
// distributed under the License is distributed on an "AS IS" BASIS, |
| 15 |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 |
// See the License for the specific language governing permissions and |
| 17 |
// limitations under the License. |
| 18 |
// |
| 19 |
// An integration test service that covers all the method signature permutations |
| 20 |
// of unary/streaming requests/responses. |
| 21 |
namespace Grpc\Testing; |
| 22 |
|
| 23 |
/** |
| 24 |
*/ |
| 25 |
class WorkerServiceClient extends \Grpc\BaseStub { |
| 26 |
|
| 27 |
/** |
| 28 |
* @param string $hostname hostname |
| 29 |
* @param array $opts channel options |
| 30 |
* @param \Grpc\Channel $channel (optional) re-use channel object |
| 31 |
*/ |
| 32 |
public function __construct($hostname, $opts, $channel = null) { |
| 33 |
parent::__construct($hostname, $opts, $channel); |
| 34 |
} |
| 35 |
|
| 36 |
/** |
| 37 |
* Start server with specified workload. |
| 38 |
* First request sent specifies the ServerConfig followed by ServerStatus |
| 39 |
* response. After that, a "Mark" can be sent anytime to request the latest |
| 40 |
* stats. Closing the stream will initiate shutdown of the test server |
| 41 |
* and once the shutdown has finished, the OK status is sent to terminate |
| 42 |
* this RPC. |
| 43 |
* @param array $metadata metadata |
| 44 |
* @param array $options call options |
| 45 |
* @return \Grpc\Testing\ServerStatus |
| 46 |
*/ |
| 47 |
public function RunServer($metadata = [], $options = []) { |
| 48 |
return $this->_bidiRequest('/grpc.testing.WorkerService/RunServer', |
| 49 |
['\Grpc\Testing\ServerStatus','decode'], |
| 50 |
$metadata, $options); |
| 51 |
} |
| 52 |
|
| 53 |
/** |
| 54 |
* Start client with specified workload. |
| 55 |
* First request sent specifies the ClientConfig followed by ClientStatus |
| 56 |
* response. After that, a "Mark" can be sent anytime to request the latest |
| 57 |
* stats. Closing the stream will initiate shutdown of the test client |
| 58 |
* and once the shutdown has finished, the OK status is sent to terminate |
| 59 |
* this RPC. |
| 60 |
* @param array $metadata metadata |
| 61 |
* @param array $options call options |
| 62 |
* @return \Grpc\Testing\ClientStatus |
| 63 |
*/ |
| 64 |
public function RunClient($metadata = [], $options = []) { |
| 65 |
return $this->_bidiRequest('/grpc.testing.WorkerService/RunClient', |
| 66 |
['\Grpc\Testing\ClientStatus','decode'], |
| 67 |
$metadata, $options); |
| 68 |
} |
| 69 |
|
| 70 |
/** |
| 71 |
* Just return the core count - unary call |
| 72 |
* @param \Grpc\Testing\CoreRequest $argument input argument |
| 73 |
* @param array $metadata metadata |
| 74 |
* @param array $options call options |
| 75 |
* @return \Grpc\Testing\CoreResponse |
| 76 |
*/ |
| 77 |
public function CoreCount(\Grpc\Testing\CoreRequest $argument, |
| 78 |
$metadata = [], $options = []) { |
| 79 |
return $this->_simpleRequest('/grpc.testing.WorkerService/CoreCount', |
| 80 |
$argument, |
| 81 |
['\Grpc\Testing\CoreResponse', 'decode'], |
| 82 |
$metadata, $options); |
| 83 |
} |
| 84 |
|
| 85 |
/** |
| 86 |
* Quit this worker |
| 87 |
* @param \Grpc\Testing\PBVoid $argument input argument |
| 88 |
* @param array $metadata metadata |
| 89 |
* @param array $options call options |
| 90 |
* @return \Grpc\Testing\PBVoid |
| 91 |
*/ |
| 92 |
public function QuitWorker(\Grpc\Testing\PBVoid $argument, |
| 93 |
$metadata = [], $options = []) { |
| 94 |
return $this->_simpleRequest('/grpc.testing.WorkerService/QuitWorker', |
| 95 |
$argument, |
| 96 |
['\Grpc\Testing\PBVoid', 'decode'], |
| 97 |
$metadata, $options); |
| 98 |
} |
| 99 |
|
| 100 |
} |