Imported Upstream version 1.41.0
[platform/upstream/grpc.git] / src / php / tests / interop / Grpc / Testing / LoadBalancerStatsServiceStub.php
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 //
22 namespace Grpc\Testing;
23
24 /**
25  * A service used to obtain stats for verifying LB behavior.
26  */
27 class LoadBalancerStatsServiceStub {
28
29     /**
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
35      */
36     public function GetClientStats(
37         \Grpc\Testing\LoadBalancerStatsRequest $request,
38         \Grpc\ServerContext $context
39     ): ?\Grpc\Testing\LoadBalancerStatsResponse {
40         $context->setStatus(\Grpc\Status::unimplemented());
41         return null;
42     }
43
44     /**
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
50      */
51     public function GetClientAccumulatedStats(
52         \Grpc\Testing\LoadBalancerAccumulatedStatsRequest $request,
53         \Grpc\ServerContext $context
54     ): ?\Grpc\Testing\LoadBalancerAccumulatedStatsResponse {
55         $context->setStatus(\Grpc\Status::unimplemented());
56         return null;
57     }
58
59     /**
60      * Get the method descriptors of the service for server registration
61      *
62      * @return array of \Grpc\MethodDescriptor for the service methods
63      */
64     public final function getMethodDescriptors(): array
65     {
66         return [
67             '/grpc.testing.LoadBalancerStatsService/GetClientStats' => new \Grpc\MethodDescriptor(
68                 $this,
69                 'GetClientStats',
70                 '\Grpc\Testing\LoadBalancerStatsRequest',
71                 \Grpc\MethodDescriptor::UNARY_CALL
72             ),
73             '/grpc.testing.LoadBalancerStatsService/GetClientAccumulatedStats' => new \Grpc\MethodDescriptor(
74                 $this,
75                 'GetClientAccumulatedStats',
76                 '\Grpc\Testing\LoadBalancerAccumulatedStatsRequest',
77                 \Grpc\MethodDescriptor::UNARY_CALL
78             ),
79         ];
80     }
81
82 }