1<?php 2// GENERATED CODE -- DO NOT EDIT! 3 4// Original file comments: 5// Copyright 2015-2016 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// 22namespace Grpc\Testing; 23 24/** 25 * Hook service. Used to keep Kubernetes from shutting the pod down. 26 */ 27class HookServiceClient extends \Grpc\BaseStub { 28 29 /** 30 * @param string $hostname hostname 31 * @param array $opts channel options 32 * @param \Grpc\Channel $channel (optional) re-use channel object 33 */ 34 public function __construct($hostname, $opts, $channel = null) { 35 parent::__construct($hostname, $opts, $channel); 36 } 37 38 /** 39 * Sends a request that will "hang" until the return status is set by a call 40 * to a SetReturnStatus 41 * @param \Grpc\Testing\EmptyMessage $argument input argument 42 * @param array $metadata metadata 43 * @param array $options call options 44 * @return \Grpc\UnaryCall 45 */ 46 public function Hook(\Grpc\Testing\EmptyMessage $argument, 47 $metadata = [], $options = []) { 48 return $this->_simpleRequest('/grpc.testing.HookService/Hook', 49 $argument, 50 ['\Grpc\Testing\EmptyMessage', 'decode'], 51 $metadata, $options); 52 } 53 54 /** 55 * Sets a return status for pending and upcoming calls to Hook 56 * @param \Grpc\Testing\SetReturnStatusRequest $argument input argument 57 * @param array $metadata metadata 58 * @param array $options call options 59 * @return \Grpc\UnaryCall 60 */ 61 public function SetReturnStatus(\Grpc\Testing\SetReturnStatusRequest $argument, 62 $metadata = [], $options = []) { 63 return $this->_simpleRequest('/grpc.testing.HookService/SetReturnStatus', 64 $argument, 65 ['\Grpc\Testing\EmptyMessage', 'decode'], 66 $metadata, $options); 67 } 68 69 /** 70 * Clears the return status. Incoming calls to Hook will "hang" 71 * @param \Grpc\Testing\EmptyMessage $argument input argument 72 * @param array $metadata metadata 73 * @param array $options call options 74 * @return \Grpc\UnaryCall 75 */ 76 public function ClearReturnStatus(\Grpc\Testing\EmptyMessage $argument, 77 $metadata = [], $options = []) { 78 return $this->_simpleRequest('/grpc.testing.HookService/ClearReturnStatus', 79 $argument, 80 ['\Grpc\Testing\EmptyMessage', 'decode'], 81 $metadata, $options); 82 } 83 84} 85