2 // GENERATED CODE -- DO NOT EDIT!
4 // Original file comments:
5 // Copyright 2015-2016 gRPC authors.
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
11 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 // An integration test service that covers all the method signature permutations
20 // of unary/streaming requests/responses.
22 namespace Grpc\Testing;
25 * A service used to obtain stats for verifying LB behavior.
27 class LoadBalancerStatsServiceStub {
30 * Gets the backend distribution for RPCs sent by a test client.
31 * @param \Grpc\Testing\LoadBalancerStatsRequest $request client request
32 * @param \Grpc\ServerContext $context server request context
33 * @return \Grpc\Testing\LoadBalancerStatsResponse for response data, null if if error occured
34 * initial metadata (if any) and status (if not ok) should be set to $context
36 public function GetClientStats(
37 \Grpc\Testing\LoadBalancerStatsRequest $request,
38 \Grpc\ServerContext $context
39 ): ?\Grpc\Testing\LoadBalancerStatsResponse {
40 $context->setStatus(\Grpc\Status::unimplemented());
45 * Gets the accumulated stats for RPCs sent by a test client.
46 * @param \Grpc\Testing\LoadBalancerAccumulatedStatsRequest $request client request
47 * @param \Grpc\ServerContext $context server request context
48 * @return \Grpc\Testing\LoadBalancerAccumulatedStatsResponse for response data, null if if error occured
49 * initial metadata (if any) and status (if not ok) should be set to $context
51 public function GetClientAccumulatedStats(
52 \Grpc\Testing\LoadBalancerAccumulatedStatsRequest $request,
53 \Grpc\ServerContext $context
54 ): ?\Grpc\Testing\LoadBalancerAccumulatedStatsResponse {
55 $context->setStatus(\Grpc\Status::unimplemented());
60 * Get the method descriptors of the service for server registration
62 * @return array of \Grpc\MethodDescriptor for the service methods
64 public final function getMethodDescriptors(): array
67 '/grpc.testing.LoadBalancerStatsService/GetClientStats' => new \Grpc\MethodDescriptor(
70 '\Grpc\Testing\LoadBalancerStatsRequest',
71 \Grpc\MethodDescriptor::UNARY_CALL
73 '/grpc.testing.LoadBalancerStatsService/GetClientAccumulatedStats' => new \Grpc\MethodDescriptor(
75 'GetClientAccumulatedStats',
76 '\Grpc\Testing\LoadBalancerAccumulatedStatsRequest',
77 \Grpc\MethodDescriptor::UNARY_CALL