test_grpc.pb.go 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119
  1. // Copyright 2015-2016 gRPC authors.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. // An integration test service that covers all the method signature permutations
  15. // of unary/streaming requests/responses.
  16. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  17. // versions:
  18. // - protoc-gen-go-grpc v1.3.0
  19. // - protoc v4.22.0
  20. // source: grpc/testing/test.proto
  21. package grpc_testing
  22. import (
  23. context "context"
  24. grpc "google.golang.org/grpc"
  25. codes "google.golang.org/grpc/codes"
  26. status "google.golang.org/grpc/status"
  27. )
  28. // This is a compile-time assertion to ensure that this generated file
  29. // is compatible with the grpc package it is being compiled against.
  30. // Requires gRPC-Go v1.32.0 or later.
  31. const _ = grpc.SupportPackageIsVersion7
  32. const (
  33. TestService_EmptyCall_FullMethodName = "/grpc.testing.TestService/EmptyCall"
  34. TestService_UnaryCall_FullMethodName = "/grpc.testing.TestService/UnaryCall"
  35. TestService_CacheableUnaryCall_FullMethodName = "/grpc.testing.TestService/CacheableUnaryCall"
  36. TestService_StreamingOutputCall_FullMethodName = "/grpc.testing.TestService/StreamingOutputCall"
  37. TestService_StreamingInputCall_FullMethodName = "/grpc.testing.TestService/StreamingInputCall"
  38. TestService_FullDuplexCall_FullMethodName = "/grpc.testing.TestService/FullDuplexCall"
  39. TestService_HalfDuplexCall_FullMethodName = "/grpc.testing.TestService/HalfDuplexCall"
  40. TestService_UnimplementedCall_FullMethodName = "/grpc.testing.TestService/UnimplementedCall"
  41. )
  42. // TestServiceClient is the client API for TestService service.
  43. //
  44. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
  45. type TestServiceClient interface {
  46. // One empty request followed by one empty response.
  47. EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
  48. // One request followed by one response.
  49. UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)
  50. // One request followed by one response. Response has cache control
  51. // headers set such that a caching HTTP proxy (such as GFE) can
  52. // satisfy subsequent requests.
  53. CacheableUnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)
  54. // One request followed by a sequence of responses (streamed download).
  55. // The server returns the payload with client desired type and sizes.
  56. StreamingOutputCall(ctx context.Context, in *StreamingOutputCallRequest, opts ...grpc.CallOption) (TestService_StreamingOutputCallClient, error)
  57. // A sequence of requests followed by one response (streamed upload).
  58. // The server returns the aggregated size of client payload as the result.
  59. StreamingInputCall(ctx context.Context, opts ...grpc.CallOption) (TestService_StreamingInputCallClient, error)
  60. // A sequence of requests with each request served by the server immediately.
  61. // As one request could lead to multiple responses, this interface
  62. // demonstrates the idea of full duplexing.
  63. FullDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_FullDuplexCallClient, error)
  64. // A sequence of requests followed by a sequence of responses.
  65. // The server buffers all the client requests and then serves them in order. A
  66. // stream of responses are returned to the client when the server starts with
  67. // first request.
  68. HalfDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_HalfDuplexCallClient, error)
  69. // The test server will not implement this method. It will be used
  70. // to test the behavior when clients call unimplemented methods.
  71. UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
  72. }
  73. type testServiceClient struct {
  74. cc grpc.ClientConnInterface
  75. }
  76. func NewTestServiceClient(cc grpc.ClientConnInterface) TestServiceClient {
  77. return &testServiceClient{cc}
  78. }
  79. func (c *testServiceClient) EmptyCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
  80. out := new(Empty)
  81. err := c.cc.Invoke(ctx, TestService_EmptyCall_FullMethodName, in, out, opts...)
  82. if err != nil {
  83. return nil, err
  84. }
  85. return out, nil
  86. }
  87. func (c *testServiceClient) UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) {
  88. out := new(SimpleResponse)
  89. err := c.cc.Invoke(ctx, TestService_UnaryCall_FullMethodName, in, out, opts...)
  90. if err != nil {
  91. return nil, err
  92. }
  93. return out, nil
  94. }
  95. func (c *testServiceClient) CacheableUnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) {
  96. out := new(SimpleResponse)
  97. err := c.cc.Invoke(ctx, TestService_CacheableUnaryCall_FullMethodName, in, out, opts...)
  98. if err != nil {
  99. return nil, err
  100. }
  101. return out, nil
  102. }
  103. func (c *testServiceClient) StreamingOutputCall(ctx context.Context, in *StreamingOutputCallRequest, opts ...grpc.CallOption) (TestService_StreamingOutputCallClient, error) {
  104. stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[0], TestService_StreamingOutputCall_FullMethodName, opts...)
  105. if err != nil {
  106. return nil, err
  107. }
  108. x := &testServiceStreamingOutputCallClient{stream}
  109. if err := x.ClientStream.SendMsg(in); err != nil {
  110. return nil, err
  111. }
  112. if err := x.ClientStream.CloseSend(); err != nil {
  113. return nil, err
  114. }
  115. return x, nil
  116. }
  117. type TestService_StreamingOutputCallClient interface {
  118. Recv() (*StreamingOutputCallResponse, error)
  119. grpc.ClientStream
  120. }
  121. type testServiceStreamingOutputCallClient struct {
  122. grpc.ClientStream
  123. }
  124. func (x *testServiceStreamingOutputCallClient) Recv() (*StreamingOutputCallResponse, error) {
  125. m := new(StreamingOutputCallResponse)
  126. if err := x.ClientStream.RecvMsg(m); err != nil {
  127. return nil, err
  128. }
  129. return m, nil
  130. }
  131. func (c *testServiceClient) StreamingInputCall(ctx context.Context, opts ...grpc.CallOption) (TestService_StreamingInputCallClient, error) {
  132. stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[1], TestService_StreamingInputCall_FullMethodName, opts...)
  133. if err != nil {
  134. return nil, err
  135. }
  136. x := &testServiceStreamingInputCallClient{stream}
  137. return x, nil
  138. }
  139. type TestService_StreamingInputCallClient interface {
  140. Send(*StreamingInputCallRequest) error
  141. CloseAndRecv() (*StreamingInputCallResponse, error)
  142. grpc.ClientStream
  143. }
  144. type testServiceStreamingInputCallClient struct {
  145. grpc.ClientStream
  146. }
  147. func (x *testServiceStreamingInputCallClient) Send(m *StreamingInputCallRequest) error {
  148. return x.ClientStream.SendMsg(m)
  149. }
  150. func (x *testServiceStreamingInputCallClient) CloseAndRecv() (*StreamingInputCallResponse, error) {
  151. if err := x.ClientStream.CloseSend(); err != nil {
  152. return nil, err
  153. }
  154. m := new(StreamingInputCallResponse)
  155. if err := x.ClientStream.RecvMsg(m); err != nil {
  156. return nil, err
  157. }
  158. return m, nil
  159. }
  160. func (c *testServiceClient) FullDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_FullDuplexCallClient, error) {
  161. stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[2], TestService_FullDuplexCall_FullMethodName, opts...)
  162. if err != nil {
  163. return nil, err
  164. }
  165. x := &testServiceFullDuplexCallClient{stream}
  166. return x, nil
  167. }
  168. type TestService_FullDuplexCallClient interface {
  169. Send(*StreamingOutputCallRequest) error
  170. Recv() (*StreamingOutputCallResponse, error)
  171. grpc.ClientStream
  172. }
  173. type testServiceFullDuplexCallClient struct {
  174. grpc.ClientStream
  175. }
  176. func (x *testServiceFullDuplexCallClient) Send(m *StreamingOutputCallRequest) error {
  177. return x.ClientStream.SendMsg(m)
  178. }
  179. func (x *testServiceFullDuplexCallClient) Recv() (*StreamingOutputCallResponse, error) {
  180. m := new(StreamingOutputCallResponse)
  181. if err := x.ClientStream.RecvMsg(m); err != nil {
  182. return nil, err
  183. }
  184. return m, nil
  185. }
  186. func (c *testServiceClient) HalfDuplexCall(ctx context.Context, opts ...grpc.CallOption) (TestService_HalfDuplexCallClient, error) {
  187. stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[3], TestService_HalfDuplexCall_FullMethodName, opts...)
  188. if err != nil {
  189. return nil, err
  190. }
  191. x := &testServiceHalfDuplexCallClient{stream}
  192. return x, nil
  193. }
  194. type TestService_HalfDuplexCallClient interface {
  195. Send(*StreamingOutputCallRequest) error
  196. Recv() (*StreamingOutputCallResponse, error)
  197. grpc.ClientStream
  198. }
  199. type testServiceHalfDuplexCallClient struct {
  200. grpc.ClientStream
  201. }
  202. func (x *testServiceHalfDuplexCallClient) Send(m *StreamingOutputCallRequest) error {
  203. return x.ClientStream.SendMsg(m)
  204. }
  205. func (x *testServiceHalfDuplexCallClient) Recv() (*StreamingOutputCallResponse, error) {
  206. m := new(StreamingOutputCallResponse)
  207. if err := x.ClientStream.RecvMsg(m); err != nil {
  208. return nil, err
  209. }
  210. return m, nil
  211. }
  212. func (c *testServiceClient) UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
  213. out := new(Empty)
  214. err := c.cc.Invoke(ctx, TestService_UnimplementedCall_FullMethodName, in, out, opts...)
  215. if err != nil {
  216. return nil, err
  217. }
  218. return out, nil
  219. }
  220. // TestServiceServer is the server API for TestService service.
  221. // All implementations must embed UnimplementedTestServiceServer
  222. // for forward compatibility
  223. type TestServiceServer interface {
  224. // One empty request followed by one empty response.
  225. EmptyCall(context.Context, *Empty) (*Empty, error)
  226. // One request followed by one response.
  227. UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error)
  228. // One request followed by one response. Response has cache control
  229. // headers set such that a caching HTTP proxy (such as GFE) can
  230. // satisfy subsequent requests.
  231. CacheableUnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error)
  232. // One request followed by a sequence of responses (streamed download).
  233. // The server returns the payload with client desired type and sizes.
  234. StreamingOutputCall(*StreamingOutputCallRequest, TestService_StreamingOutputCallServer) error
  235. // A sequence of requests followed by one response (streamed upload).
  236. // The server returns the aggregated size of client payload as the result.
  237. StreamingInputCall(TestService_StreamingInputCallServer) error
  238. // A sequence of requests with each request served by the server immediately.
  239. // As one request could lead to multiple responses, this interface
  240. // demonstrates the idea of full duplexing.
  241. FullDuplexCall(TestService_FullDuplexCallServer) error
  242. // A sequence of requests followed by a sequence of responses.
  243. // The server buffers all the client requests and then serves them in order. A
  244. // stream of responses are returned to the client when the server starts with
  245. // first request.
  246. HalfDuplexCall(TestService_HalfDuplexCallServer) error
  247. // The test server will not implement this method. It will be used
  248. // to test the behavior when clients call unimplemented methods.
  249. UnimplementedCall(context.Context, *Empty) (*Empty, error)
  250. mustEmbedUnimplementedTestServiceServer()
  251. }
  252. // UnimplementedTestServiceServer must be embedded to have forward compatible implementations.
  253. type UnimplementedTestServiceServer struct {
  254. }
  255. func (UnimplementedTestServiceServer) EmptyCall(context.Context, *Empty) (*Empty, error) {
  256. return nil, status.Errorf(codes.Unimplemented, "method EmptyCall not implemented")
  257. }
  258. func (UnimplementedTestServiceServer) UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) {
  259. return nil, status.Errorf(codes.Unimplemented, "method UnaryCall not implemented")
  260. }
  261. func (UnimplementedTestServiceServer) CacheableUnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) {
  262. return nil, status.Errorf(codes.Unimplemented, "method CacheableUnaryCall not implemented")
  263. }
  264. func (UnimplementedTestServiceServer) StreamingOutputCall(*StreamingOutputCallRequest, TestService_StreamingOutputCallServer) error {
  265. return status.Errorf(codes.Unimplemented, "method StreamingOutputCall not implemented")
  266. }
  267. func (UnimplementedTestServiceServer) StreamingInputCall(TestService_StreamingInputCallServer) error {
  268. return status.Errorf(codes.Unimplemented, "method StreamingInputCall not implemented")
  269. }
  270. func (UnimplementedTestServiceServer) FullDuplexCall(TestService_FullDuplexCallServer) error {
  271. return status.Errorf(codes.Unimplemented, "method FullDuplexCall not implemented")
  272. }
  273. func (UnimplementedTestServiceServer) HalfDuplexCall(TestService_HalfDuplexCallServer) error {
  274. return status.Errorf(codes.Unimplemented, "method HalfDuplexCall not implemented")
  275. }
  276. func (UnimplementedTestServiceServer) UnimplementedCall(context.Context, *Empty) (*Empty, error) {
  277. return nil, status.Errorf(codes.Unimplemented, "method UnimplementedCall not implemented")
  278. }
  279. func (UnimplementedTestServiceServer) mustEmbedUnimplementedTestServiceServer() {}
  280. // UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service.
  281. // Use of this interface is not recommended, as added methods to TestServiceServer will
  282. // result in compilation errors.
  283. type UnsafeTestServiceServer interface {
  284. mustEmbedUnimplementedTestServiceServer()
  285. }
  286. func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer) {
  287. s.RegisterService(&TestService_ServiceDesc, srv)
  288. }
  289. func _TestService_EmptyCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  290. in := new(Empty)
  291. if err := dec(in); err != nil {
  292. return nil, err
  293. }
  294. if interceptor == nil {
  295. return srv.(TestServiceServer).EmptyCall(ctx, in)
  296. }
  297. info := &grpc.UnaryServerInfo{
  298. Server: srv,
  299. FullMethod: TestService_EmptyCall_FullMethodName,
  300. }
  301. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  302. return srv.(TestServiceServer).EmptyCall(ctx, req.(*Empty))
  303. }
  304. return interceptor(ctx, in, info, handler)
  305. }
  306. func _TestService_UnaryCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  307. in := new(SimpleRequest)
  308. if err := dec(in); err != nil {
  309. return nil, err
  310. }
  311. if interceptor == nil {
  312. return srv.(TestServiceServer).UnaryCall(ctx, in)
  313. }
  314. info := &grpc.UnaryServerInfo{
  315. Server: srv,
  316. FullMethod: TestService_UnaryCall_FullMethodName,
  317. }
  318. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  319. return srv.(TestServiceServer).UnaryCall(ctx, req.(*SimpleRequest))
  320. }
  321. return interceptor(ctx, in, info, handler)
  322. }
  323. func _TestService_CacheableUnaryCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  324. in := new(SimpleRequest)
  325. if err := dec(in); err != nil {
  326. return nil, err
  327. }
  328. if interceptor == nil {
  329. return srv.(TestServiceServer).CacheableUnaryCall(ctx, in)
  330. }
  331. info := &grpc.UnaryServerInfo{
  332. Server: srv,
  333. FullMethod: TestService_CacheableUnaryCall_FullMethodName,
  334. }
  335. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  336. return srv.(TestServiceServer).CacheableUnaryCall(ctx, req.(*SimpleRequest))
  337. }
  338. return interceptor(ctx, in, info, handler)
  339. }
  340. func _TestService_StreamingOutputCall_Handler(srv interface{}, stream grpc.ServerStream) error {
  341. m := new(StreamingOutputCallRequest)
  342. if err := stream.RecvMsg(m); err != nil {
  343. return err
  344. }
  345. return srv.(TestServiceServer).StreamingOutputCall(m, &testServiceStreamingOutputCallServer{stream})
  346. }
  347. type TestService_StreamingOutputCallServer interface {
  348. Send(*StreamingOutputCallResponse) error
  349. grpc.ServerStream
  350. }
  351. type testServiceStreamingOutputCallServer struct {
  352. grpc.ServerStream
  353. }
  354. func (x *testServiceStreamingOutputCallServer) Send(m *StreamingOutputCallResponse) error {
  355. return x.ServerStream.SendMsg(m)
  356. }
  357. func _TestService_StreamingInputCall_Handler(srv interface{}, stream grpc.ServerStream) error {
  358. return srv.(TestServiceServer).StreamingInputCall(&testServiceStreamingInputCallServer{stream})
  359. }
  360. type TestService_StreamingInputCallServer interface {
  361. SendAndClose(*StreamingInputCallResponse) error
  362. Recv() (*StreamingInputCallRequest, error)
  363. grpc.ServerStream
  364. }
  365. type testServiceStreamingInputCallServer struct {
  366. grpc.ServerStream
  367. }
  368. func (x *testServiceStreamingInputCallServer) SendAndClose(m *StreamingInputCallResponse) error {
  369. return x.ServerStream.SendMsg(m)
  370. }
  371. func (x *testServiceStreamingInputCallServer) Recv() (*StreamingInputCallRequest, error) {
  372. m := new(StreamingInputCallRequest)
  373. if err := x.ServerStream.RecvMsg(m); err != nil {
  374. return nil, err
  375. }
  376. return m, nil
  377. }
  378. func _TestService_FullDuplexCall_Handler(srv interface{}, stream grpc.ServerStream) error {
  379. return srv.(TestServiceServer).FullDuplexCall(&testServiceFullDuplexCallServer{stream})
  380. }
  381. type TestService_FullDuplexCallServer interface {
  382. Send(*StreamingOutputCallResponse) error
  383. Recv() (*StreamingOutputCallRequest, error)
  384. grpc.ServerStream
  385. }
  386. type testServiceFullDuplexCallServer struct {
  387. grpc.ServerStream
  388. }
  389. func (x *testServiceFullDuplexCallServer) Send(m *StreamingOutputCallResponse) error {
  390. return x.ServerStream.SendMsg(m)
  391. }
  392. func (x *testServiceFullDuplexCallServer) Recv() (*StreamingOutputCallRequest, error) {
  393. m := new(StreamingOutputCallRequest)
  394. if err := x.ServerStream.RecvMsg(m); err != nil {
  395. return nil, err
  396. }
  397. return m, nil
  398. }
  399. func _TestService_HalfDuplexCall_Handler(srv interface{}, stream grpc.ServerStream) error {
  400. return srv.(TestServiceServer).HalfDuplexCall(&testServiceHalfDuplexCallServer{stream})
  401. }
  402. type TestService_HalfDuplexCallServer interface {
  403. Send(*StreamingOutputCallResponse) error
  404. Recv() (*StreamingOutputCallRequest, error)
  405. grpc.ServerStream
  406. }
  407. type testServiceHalfDuplexCallServer struct {
  408. grpc.ServerStream
  409. }
  410. func (x *testServiceHalfDuplexCallServer) Send(m *StreamingOutputCallResponse) error {
  411. return x.ServerStream.SendMsg(m)
  412. }
  413. func (x *testServiceHalfDuplexCallServer) Recv() (*StreamingOutputCallRequest, error) {
  414. m := new(StreamingOutputCallRequest)
  415. if err := x.ServerStream.RecvMsg(m); err != nil {
  416. return nil, err
  417. }
  418. return m, nil
  419. }
  420. func _TestService_UnimplementedCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  421. in := new(Empty)
  422. if err := dec(in); err != nil {
  423. return nil, err
  424. }
  425. if interceptor == nil {
  426. return srv.(TestServiceServer).UnimplementedCall(ctx, in)
  427. }
  428. info := &grpc.UnaryServerInfo{
  429. Server: srv,
  430. FullMethod: TestService_UnimplementedCall_FullMethodName,
  431. }
  432. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  433. return srv.(TestServiceServer).UnimplementedCall(ctx, req.(*Empty))
  434. }
  435. return interceptor(ctx, in, info, handler)
  436. }
  437. // TestService_ServiceDesc is the grpc.ServiceDesc for TestService service.
  438. // It's only intended for direct use with grpc.RegisterService,
  439. // and not to be introspected or modified (even as a copy)
  440. var TestService_ServiceDesc = grpc.ServiceDesc{
  441. ServiceName: "grpc.testing.TestService",
  442. HandlerType: (*TestServiceServer)(nil),
  443. Methods: []grpc.MethodDesc{
  444. {
  445. MethodName: "EmptyCall",
  446. Handler: _TestService_EmptyCall_Handler,
  447. },
  448. {
  449. MethodName: "UnaryCall",
  450. Handler: _TestService_UnaryCall_Handler,
  451. },
  452. {
  453. MethodName: "CacheableUnaryCall",
  454. Handler: _TestService_CacheableUnaryCall_Handler,
  455. },
  456. {
  457. MethodName: "UnimplementedCall",
  458. Handler: _TestService_UnimplementedCall_Handler,
  459. },
  460. },
  461. Streams: []grpc.StreamDesc{
  462. {
  463. StreamName: "StreamingOutputCall",
  464. Handler: _TestService_StreamingOutputCall_Handler,
  465. ServerStreams: true,
  466. },
  467. {
  468. StreamName: "StreamingInputCall",
  469. Handler: _TestService_StreamingInputCall_Handler,
  470. ClientStreams: true,
  471. },
  472. {
  473. StreamName: "FullDuplexCall",
  474. Handler: _TestService_FullDuplexCall_Handler,
  475. ServerStreams: true,
  476. ClientStreams: true,
  477. },
  478. {
  479. StreamName: "HalfDuplexCall",
  480. Handler: _TestService_HalfDuplexCall_Handler,
  481. ServerStreams: true,
  482. ClientStreams: true,
  483. },
  484. },
  485. Metadata: "grpc/testing/test.proto",
  486. }
  487. const (
  488. UnimplementedService_UnimplementedCall_FullMethodName = "/grpc.testing.UnimplementedService/UnimplementedCall"
  489. )
  490. // UnimplementedServiceClient is the client API for UnimplementedService service.
  491. //
  492. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
  493. type UnimplementedServiceClient interface {
  494. // A call that no server should implement
  495. UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
  496. }
  497. type unimplementedServiceClient struct {
  498. cc grpc.ClientConnInterface
  499. }
  500. func NewUnimplementedServiceClient(cc grpc.ClientConnInterface) UnimplementedServiceClient {
  501. return &unimplementedServiceClient{cc}
  502. }
  503. func (c *unimplementedServiceClient) UnimplementedCall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
  504. out := new(Empty)
  505. err := c.cc.Invoke(ctx, UnimplementedService_UnimplementedCall_FullMethodName, in, out, opts...)
  506. if err != nil {
  507. return nil, err
  508. }
  509. return out, nil
  510. }
  511. // UnimplementedServiceServer is the server API for UnimplementedService service.
  512. // All implementations must embed UnimplementedUnimplementedServiceServer
  513. // for forward compatibility
  514. type UnimplementedServiceServer interface {
  515. // A call that no server should implement
  516. UnimplementedCall(context.Context, *Empty) (*Empty, error)
  517. mustEmbedUnimplementedUnimplementedServiceServer()
  518. }
  519. // UnimplementedUnimplementedServiceServer must be embedded to have forward compatible implementations.
  520. type UnimplementedUnimplementedServiceServer struct {
  521. }
  522. func (UnimplementedUnimplementedServiceServer) UnimplementedCall(context.Context, *Empty) (*Empty, error) {
  523. return nil, status.Errorf(codes.Unimplemented, "method UnimplementedCall not implemented")
  524. }
  525. func (UnimplementedUnimplementedServiceServer) mustEmbedUnimplementedUnimplementedServiceServer() {}
  526. // UnsafeUnimplementedServiceServer may be embedded to opt out of forward compatibility for this service.
  527. // Use of this interface is not recommended, as added methods to UnimplementedServiceServer will
  528. // result in compilation errors.
  529. type UnsafeUnimplementedServiceServer interface {
  530. mustEmbedUnimplementedUnimplementedServiceServer()
  531. }
  532. func RegisterUnimplementedServiceServer(s grpc.ServiceRegistrar, srv UnimplementedServiceServer) {
  533. s.RegisterService(&UnimplementedService_ServiceDesc, srv)
  534. }
  535. func _UnimplementedService_UnimplementedCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  536. in := new(Empty)
  537. if err := dec(in); err != nil {
  538. return nil, err
  539. }
  540. if interceptor == nil {
  541. return srv.(UnimplementedServiceServer).UnimplementedCall(ctx, in)
  542. }
  543. info := &grpc.UnaryServerInfo{
  544. Server: srv,
  545. FullMethod: UnimplementedService_UnimplementedCall_FullMethodName,
  546. }
  547. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  548. return srv.(UnimplementedServiceServer).UnimplementedCall(ctx, req.(*Empty))
  549. }
  550. return interceptor(ctx, in, info, handler)
  551. }
  552. // UnimplementedService_ServiceDesc is the grpc.ServiceDesc for UnimplementedService service.
  553. // It's only intended for direct use with grpc.RegisterService,
  554. // and not to be introspected or modified (even as a copy)
  555. var UnimplementedService_ServiceDesc = grpc.ServiceDesc{
  556. ServiceName: "grpc.testing.UnimplementedService",
  557. HandlerType: (*UnimplementedServiceServer)(nil),
  558. Methods: []grpc.MethodDesc{
  559. {
  560. MethodName: "UnimplementedCall",
  561. Handler: _UnimplementedService_UnimplementedCall_Handler,
  562. },
  563. },
  564. Streams: []grpc.StreamDesc{},
  565. Metadata: "grpc/testing/test.proto",
  566. }
  567. const (
  568. ReconnectService_Start_FullMethodName = "/grpc.testing.ReconnectService/Start"
  569. ReconnectService_Stop_FullMethodName = "/grpc.testing.ReconnectService/Stop"
  570. )
  571. // ReconnectServiceClient is the client API for ReconnectService service.
  572. //
  573. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
  574. type ReconnectServiceClient interface {
  575. Start(ctx context.Context, in *ReconnectParams, opts ...grpc.CallOption) (*Empty, error)
  576. Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ReconnectInfo, error)
  577. }
  578. type reconnectServiceClient struct {
  579. cc grpc.ClientConnInterface
  580. }
  581. func NewReconnectServiceClient(cc grpc.ClientConnInterface) ReconnectServiceClient {
  582. return &reconnectServiceClient{cc}
  583. }
  584. func (c *reconnectServiceClient) Start(ctx context.Context, in *ReconnectParams, opts ...grpc.CallOption) (*Empty, error) {
  585. out := new(Empty)
  586. err := c.cc.Invoke(ctx, ReconnectService_Start_FullMethodName, in, out, opts...)
  587. if err != nil {
  588. return nil, err
  589. }
  590. return out, nil
  591. }
  592. func (c *reconnectServiceClient) Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ReconnectInfo, error) {
  593. out := new(ReconnectInfo)
  594. err := c.cc.Invoke(ctx, ReconnectService_Stop_FullMethodName, in, out, opts...)
  595. if err != nil {
  596. return nil, err
  597. }
  598. return out, nil
  599. }
  600. // ReconnectServiceServer is the server API for ReconnectService service.
  601. // All implementations must embed UnimplementedReconnectServiceServer
  602. // for forward compatibility
  603. type ReconnectServiceServer interface {
  604. Start(context.Context, *ReconnectParams) (*Empty, error)
  605. Stop(context.Context, *Empty) (*ReconnectInfo, error)
  606. mustEmbedUnimplementedReconnectServiceServer()
  607. }
  608. // UnimplementedReconnectServiceServer must be embedded to have forward compatible implementations.
  609. type UnimplementedReconnectServiceServer struct {
  610. }
  611. func (UnimplementedReconnectServiceServer) Start(context.Context, *ReconnectParams) (*Empty, error) {
  612. return nil, status.Errorf(codes.Unimplemented, "method Start not implemented")
  613. }
  614. func (UnimplementedReconnectServiceServer) Stop(context.Context, *Empty) (*ReconnectInfo, error) {
  615. return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented")
  616. }
  617. func (UnimplementedReconnectServiceServer) mustEmbedUnimplementedReconnectServiceServer() {}
  618. // UnsafeReconnectServiceServer may be embedded to opt out of forward compatibility for this service.
  619. // Use of this interface is not recommended, as added methods to ReconnectServiceServer will
  620. // result in compilation errors.
  621. type UnsafeReconnectServiceServer interface {
  622. mustEmbedUnimplementedReconnectServiceServer()
  623. }
  624. func RegisterReconnectServiceServer(s grpc.ServiceRegistrar, srv ReconnectServiceServer) {
  625. s.RegisterService(&ReconnectService_ServiceDesc, srv)
  626. }
  627. func _ReconnectService_Start_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  628. in := new(ReconnectParams)
  629. if err := dec(in); err != nil {
  630. return nil, err
  631. }
  632. if interceptor == nil {
  633. return srv.(ReconnectServiceServer).Start(ctx, in)
  634. }
  635. info := &grpc.UnaryServerInfo{
  636. Server: srv,
  637. FullMethod: ReconnectService_Start_FullMethodName,
  638. }
  639. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  640. return srv.(ReconnectServiceServer).Start(ctx, req.(*ReconnectParams))
  641. }
  642. return interceptor(ctx, in, info, handler)
  643. }
  644. func _ReconnectService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  645. in := new(Empty)
  646. if err := dec(in); err != nil {
  647. return nil, err
  648. }
  649. if interceptor == nil {
  650. return srv.(ReconnectServiceServer).Stop(ctx, in)
  651. }
  652. info := &grpc.UnaryServerInfo{
  653. Server: srv,
  654. FullMethod: ReconnectService_Stop_FullMethodName,
  655. }
  656. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  657. return srv.(ReconnectServiceServer).Stop(ctx, req.(*Empty))
  658. }
  659. return interceptor(ctx, in, info, handler)
  660. }
  661. // ReconnectService_ServiceDesc is the grpc.ServiceDesc for ReconnectService service.
  662. // It's only intended for direct use with grpc.RegisterService,
  663. // and not to be introspected or modified (even as a copy)
  664. var ReconnectService_ServiceDesc = grpc.ServiceDesc{
  665. ServiceName: "grpc.testing.ReconnectService",
  666. HandlerType: (*ReconnectServiceServer)(nil),
  667. Methods: []grpc.MethodDesc{
  668. {
  669. MethodName: "Start",
  670. Handler: _ReconnectService_Start_Handler,
  671. },
  672. {
  673. MethodName: "Stop",
  674. Handler: _ReconnectService_Stop_Handler,
  675. },
  676. },
  677. Streams: []grpc.StreamDesc{},
  678. Metadata: "grpc/testing/test.proto",
  679. }
  680. const (
  681. LoadBalancerStatsService_GetClientStats_FullMethodName = "/grpc.testing.LoadBalancerStatsService/GetClientStats"
  682. LoadBalancerStatsService_GetClientAccumulatedStats_FullMethodName = "/grpc.testing.LoadBalancerStatsService/GetClientAccumulatedStats"
  683. )
  684. // LoadBalancerStatsServiceClient is the client API for LoadBalancerStatsService service.
  685. //
  686. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
  687. type LoadBalancerStatsServiceClient interface {
  688. // Gets the backend distribution for RPCs sent by a test client.
  689. GetClientStats(ctx context.Context, in *LoadBalancerStatsRequest, opts ...grpc.CallOption) (*LoadBalancerStatsResponse, error)
  690. // Gets the accumulated stats for RPCs sent by a test client.
  691. GetClientAccumulatedStats(ctx context.Context, in *LoadBalancerAccumulatedStatsRequest, opts ...grpc.CallOption) (*LoadBalancerAccumulatedStatsResponse, error)
  692. }
  693. type loadBalancerStatsServiceClient struct {
  694. cc grpc.ClientConnInterface
  695. }
  696. func NewLoadBalancerStatsServiceClient(cc grpc.ClientConnInterface) LoadBalancerStatsServiceClient {
  697. return &loadBalancerStatsServiceClient{cc}
  698. }
  699. func (c *loadBalancerStatsServiceClient) GetClientStats(ctx context.Context, in *LoadBalancerStatsRequest, opts ...grpc.CallOption) (*LoadBalancerStatsResponse, error) {
  700. out := new(LoadBalancerStatsResponse)
  701. err := c.cc.Invoke(ctx, LoadBalancerStatsService_GetClientStats_FullMethodName, in, out, opts...)
  702. if err != nil {
  703. return nil, err
  704. }
  705. return out, nil
  706. }
  707. func (c *loadBalancerStatsServiceClient) GetClientAccumulatedStats(ctx context.Context, in *LoadBalancerAccumulatedStatsRequest, opts ...grpc.CallOption) (*LoadBalancerAccumulatedStatsResponse, error) {
  708. out := new(LoadBalancerAccumulatedStatsResponse)
  709. err := c.cc.Invoke(ctx, LoadBalancerStatsService_GetClientAccumulatedStats_FullMethodName, in, out, opts...)
  710. if err != nil {
  711. return nil, err
  712. }
  713. return out, nil
  714. }
  715. // LoadBalancerStatsServiceServer is the server API for LoadBalancerStatsService service.
  716. // All implementations must embed UnimplementedLoadBalancerStatsServiceServer
  717. // for forward compatibility
  718. type LoadBalancerStatsServiceServer interface {
  719. // Gets the backend distribution for RPCs sent by a test client.
  720. GetClientStats(context.Context, *LoadBalancerStatsRequest) (*LoadBalancerStatsResponse, error)
  721. // Gets the accumulated stats for RPCs sent by a test client.
  722. GetClientAccumulatedStats(context.Context, *LoadBalancerAccumulatedStatsRequest) (*LoadBalancerAccumulatedStatsResponse, error)
  723. mustEmbedUnimplementedLoadBalancerStatsServiceServer()
  724. }
  725. // UnimplementedLoadBalancerStatsServiceServer must be embedded to have forward compatible implementations.
  726. type UnimplementedLoadBalancerStatsServiceServer struct {
  727. }
  728. func (UnimplementedLoadBalancerStatsServiceServer) GetClientStats(context.Context, *LoadBalancerStatsRequest) (*LoadBalancerStatsResponse, error) {
  729. return nil, status.Errorf(codes.Unimplemented, "method GetClientStats not implemented")
  730. }
  731. func (UnimplementedLoadBalancerStatsServiceServer) GetClientAccumulatedStats(context.Context, *LoadBalancerAccumulatedStatsRequest) (*LoadBalancerAccumulatedStatsResponse, error) {
  732. return nil, status.Errorf(codes.Unimplemented, "method GetClientAccumulatedStats not implemented")
  733. }
  734. func (UnimplementedLoadBalancerStatsServiceServer) mustEmbedUnimplementedLoadBalancerStatsServiceServer() {
  735. }
  736. // UnsafeLoadBalancerStatsServiceServer may be embedded to opt out of forward compatibility for this service.
  737. // Use of this interface is not recommended, as added methods to LoadBalancerStatsServiceServer will
  738. // result in compilation errors.
  739. type UnsafeLoadBalancerStatsServiceServer interface {
  740. mustEmbedUnimplementedLoadBalancerStatsServiceServer()
  741. }
  742. func RegisterLoadBalancerStatsServiceServer(s grpc.ServiceRegistrar, srv LoadBalancerStatsServiceServer) {
  743. s.RegisterService(&LoadBalancerStatsService_ServiceDesc, srv)
  744. }
  745. func _LoadBalancerStatsService_GetClientStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  746. in := new(LoadBalancerStatsRequest)
  747. if err := dec(in); err != nil {
  748. return nil, err
  749. }
  750. if interceptor == nil {
  751. return srv.(LoadBalancerStatsServiceServer).GetClientStats(ctx, in)
  752. }
  753. info := &grpc.UnaryServerInfo{
  754. Server: srv,
  755. FullMethod: LoadBalancerStatsService_GetClientStats_FullMethodName,
  756. }
  757. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  758. return srv.(LoadBalancerStatsServiceServer).GetClientStats(ctx, req.(*LoadBalancerStatsRequest))
  759. }
  760. return interceptor(ctx, in, info, handler)
  761. }
  762. func _LoadBalancerStatsService_GetClientAccumulatedStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  763. in := new(LoadBalancerAccumulatedStatsRequest)
  764. if err := dec(in); err != nil {
  765. return nil, err
  766. }
  767. if interceptor == nil {
  768. return srv.(LoadBalancerStatsServiceServer).GetClientAccumulatedStats(ctx, in)
  769. }
  770. info := &grpc.UnaryServerInfo{
  771. Server: srv,
  772. FullMethod: LoadBalancerStatsService_GetClientAccumulatedStats_FullMethodName,
  773. }
  774. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  775. return srv.(LoadBalancerStatsServiceServer).GetClientAccumulatedStats(ctx, req.(*LoadBalancerAccumulatedStatsRequest))
  776. }
  777. return interceptor(ctx, in, info, handler)
  778. }
  779. // LoadBalancerStatsService_ServiceDesc is the grpc.ServiceDesc for LoadBalancerStatsService service.
  780. // It's only intended for direct use with grpc.RegisterService,
  781. // and not to be introspected or modified (even as a copy)
  782. var LoadBalancerStatsService_ServiceDesc = grpc.ServiceDesc{
  783. ServiceName: "grpc.testing.LoadBalancerStatsService",
  784. HandlerType: (*LoadBalancerStatsServiceServer)(nil),
  785. Methods: []grpc.MethodDesc{
  786. {
  787. MethodName: "GetClientStats",
  788. Handler: _LoadBalancerStatsService_GetClientStats_Handler,
  789. },
  790. {
  791. MethodName: "GetClientAccumulatedStats",
  792. Handler: _LoadBalancerStatsService_GetClientAccumulatedStats_Handler,
  793. },
  794. },
  795. Streams: []grpc.StreamDesc{},
  796. Metadata: "grpc/testing/test.proto",
  797. }
  798. const (
  799. XdsUpdateHealthService_SetServing_FullMethodName = "/grpc.testing.XdsUpdateHealthService/SetServing"
  800. XdsUpdateHealthService_SetNotServing_FullMethodName = "/grpc.testing.XdsUpdateHealthService/SetNotServing"
  801. )
  802. // XdsUpdateHealthServiceClient is the client API for XdsUpdateHealthService service.
  803. //
  804. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
  805. type XdsUpdateHealthServiceClient interface {
  806. SetServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
  807. SetNotServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
  808. }
  809. type xdsUpdateHealthServiceClient struct {
  810. cc grpc.ClientConnInterface
  811. }
  812. func NewXdsUpdateHealthServiceClient(cc grpc.ClientConnInterface) XdsUpdateHealthServiceClient {
  813. return &xdsUpdateHealthServiceClient{cc}
  814. }
  815. func (c *xdsUpdateHealthServiceClient) SetServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
  816. out := new(Empty)
  817. err := c.cc.Invoke(ctx, XdsUpdateHealthService_SetServing_FullMethodName, in, out, opts...)
  818. if err != nil {
  819. return nil, err
  820. }
  821. return out, nil
  822. }
  823. func (c *xdsUpdateHealthServiceClient) SetNotServing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
  824. out := new(Empty)
  825. err := c.cc.Invoke(ctx, XdsUpdateHealthService_SetNotServing_FullMethodName, in, out, opts...)
  826. if err != nil {
  827. return nil, err
  828. }
  829. return out, nil
  830. }
  831. // XdsUpdateHealthServiceServer is the server API for XdsUpdateHealthService service.
  832. // All implementations must embed UnimplementedXdsUpdateHealthServiceServer
  833. // for forward compatibility
  834. type XdsUpdateHealthServiceServer interface {
  835. SetServing(context.Context, *Empty) (*Empty, error)
  836. SetNotServing(context.Context, *Empty) (*Empty, error)
  837. mustEmbedUnimplementedXdsUpdateHealthServiceServer()
  838. }
  839. // UnimplementedXdsUpdateHealthServiceServer must be embedded to have forward compatible implementations.
  840. type UnimplementedXdsUpdateHealthServiceServer struct {
  841. }
  842. func (UnimplementedXdsUpdateHealthServiceServer) SetServing(context.Context, *Empty) (*Empty, error) {
  843. return nil, status.Errorf(codes.Unimplemented, "method SetServing not implemented")
  844. }
  845. func (UnimplementedXdsUpdateHealthServiceServer) SetNotServing(context.Context, *Empty) (*Empty, error) {
  846. return nil, status.Errorf(codes.Unimplemented, "method SetNotServing not implemented")
  847. }
  848. func (UnimplementedXdsUpdateHealthServiceServer) mustEmbedUnimplementedXdsUpdateHealthServiceServer() {
  849. }
  850. // UnsafeXdsUpdateHealthServiceServer may be embedded to opt out of forward compatibility for this service.
  851. // Use of this interface is not recommended, as added methods to XdsUpdateHealthServiceServer will
  852. // result in compilation errors.
  853. type UnsafeXdsUpdateHealthServiceServer interface {
  854. mustEmbedUnimplementedXdsUpdateHealthServiceServer()
  855. }
  856. func RegisterXdsUpdateHealthServiceServer(s grpc.ServiceRegistrar, srv XdsUpdateHealthServiceServer) {
  857. s.RegisterService(&XdsUpdateHealthService_ServiceDesc, srv)
  858. }
  859. func _XdsUpdateHealthService_SetServing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  860. in := new(Empty)
  861. if err := dec(in); err != nil {
  862. return nil, err
  863. }
  864. if interceptor == nil {
  865. return srv.(XdsUpdateHealthServiceServer).SetServing(ctx, in)
  866. }
  867. info := &grpc.UnaryServerInfo{
  868. Server: srv,
  869. FullMethod: XdsUpdateHealthService_SetServing_FullMethodName,
  870. }
  871. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  872. return srv.(XdsUpdateHealthServiceServer).SetServing(ctx, req.(*Empty))
  873. }
  874. return interceptor(ctx, in, info, handler)
  875. }
  876. func _XdsUpdateHealthService_SetNotServing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  877. in := new(Empty)
  878. if err := dec(in); err != nil {
  879. return nil, err
  880. }
  881. if interceptor == nil {
  882. return srv.(XdsUpdateHealthServiceServer).SetNotServing(ctx, in)
  883. }
  884. info := &grpc.UnaryServerInfo{
  885. Server: srv,
  886. FullMethod: XdsUpdateHealthService_SetNotServing_FullMethodName,
  887. }
  888. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  889. return srv.(XdsUpdateHealthServiceServer).SetNotServing(ctx, req.(*Empty))
  890. }
  891. return interceptor(ctx, in, info, handler)
  892. }
  893. // XdsUpdateHealthService_ServiceDesc is the grpc.ServiceDesc for XdsUpdateHealthService service.
  894. // It's only intended for direct use with grpc.RegisterService,
  895. // and not to be introspected or modified (even as a copy)
  896. var XdsUpdateHealthService_ServiceDesc = grpc.ServiceDesc{
  897. ServiceName: "grpc.testing.XdsUpdateHealthService",
  898. HandlerType: (*XdsUpdateHealthServiceServer)(nil),
  899. Methods: []grpc.MethodDesc{
  900. {
  901. MethodName: "SetServing",
  902. Handler: _XdsUpdateHealthService_SetServing_Handler,
  903. },
  904. {
  905. MethodName: "SetNotServing",
  906. Handler: _XdsUpdateHealthService_SetNotServing_Handler,
  907. },
  908. },
  909. Streams: []grpc.StreamDesc{},
  910. Metadata: "grpc/testing/test.proto",
  911. }
  912. const (
  913. XdsUpdateClientConfigureService_Configure_FullMethodName = "/grpc.testing.XdsUpdateClientConfigureService/Configure"
  914. )
  915. // XdsUpdateClientConfigureServiceClient is the client API for XdsUpdateClientConfigureService service.
  916. //
  917. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
  918. type XdsUpdateClientConfigureServiceClient interface {
  919. // Update the tes client's configuration.
  920. Configure(ctx context.Context, in *ClientConfigureRequest, opts ...grpc.CallOption) (*ClientConfigureResponse, error)
  921. }
  922. type xdsUpdateClientConfigureServiceClient struct {
  923. cc grpc.ClientConnInterface
  924. }
  925. func NewXdsUpdateClientConfigureServiceClient(cc grpc.ClientConnInterface) XdsUpdateClientConfigureServiceClient {
  926. return &xdsUpdateClientConfigureServiceClient{cc}
  927. }
  928. func (c *xdsUpdateClientConfigureServiceClient) Configure(ctx context.Context, in *ClientConfigureRequest, opts ...grpc.CallOption) (*ClientConfigureResponse, error) {
  929. out := new(ClientConfigureResponse)
  930. err := c.cc.Invoke(ctx, XdsUpdateClientConfigureService_Configure_FullMethodName, in, out, opts...)
  931. if err != nil {
  932. return nil, err
  933. }
  934. return out, nil
  935. }
  936. // XdsUpdateClientConfigureServiceServer is the server API for XdsUpdateClientConfigureService service.
  937. // All implementations must embed UnimplementedXdsUpdateClientConfigureServiceServer
  938. // for forward compatibility
  939. type XdsUpdateClientConfigureServiceServer interface {
  940. // Update the tes client's configuration.
  941. Configure(context.Context, *ClientConfigureRequest) (*ClientConfigureResponse, error)
  942. mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer()
  943. }
  944. // UnimplementedXdsUpdateClientConfigureServiceServer must be embedded to have forward compatible implementations.
  945. type UnimplementedXdsUpdateClientConfigureServiceServer struct {
  946. }
  947. func (UnimplementedXdsUpdateClientConfigureServiceServer) Configure(context.Context, *ClientConfigureRequest) (*ClientConfigureResponse, error) {
  948. return nil, status.Errorf(codes.Unimplemented, "method Configure not implemented")
  949. }
  950. func (UnimplementedXdsUpdateClientConfigureServiceServer) mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer() {
  951. }
  952. // UnsafeXdsUpdateClientConfigureServiceServer may be embedded to opt out of forward compatibility for this service.
  953. // Use of this interface is not recommended, as added methods to XdsUpdateClientConfigureServiceServer will
  954. // result in compilation errors.
  955. type UnsafeXdsUpdateClientConfigureServiceServer interface {
  956. mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer()
  957. }
  958. func RegisterXdsUpdateClientConfigureServiceServer(s grpc.ServiceRegistrar, srv XdsUpdateClientConfigureServiceServer) {
  959. s.RegisterService(&XdsUpdateClientConfigureService_ServiceDesc, srv)
  960. }
  961. func _XdsUpdateClientConfigureService_Configure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  962. in := new(ClientConfigureRequest)
  963. if err := dec(in); err != nil {
  964. return nil, err
  965. }
  966. if interceptor == nil {
  967. return srv.(XdsUpdateClientConfigureServiceServer).Configure(ctx, in)
  968. }
  969. info := &grpc.UnaryServerInfo{
  970. Server: srv,
  971. FullMethod: XdsUpdateClientConfigureService_Configure_FullMethodName,
  972. }
  973. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  974. return srv.(XdsUpdateClientConfigureServiceServer).Configure(ctx, req.(*ClientConfigureRequest))
  975. }
  976. return interceptor(ctx, in, info, handler)
  977. }
  978. // XdsUpdateClientConfigureService_ServiceDesc is the grpc.ServiceDesc for XdsUpdateClientConfigureService service.
  979. // It's only intended for direct use with grpc.RegisterService,
  980. // and not to be introspected or modified (even as a copy)
  981. var XdsUpdateClientConfigureService_ServiceDesc = grpc.ServiceDesc{
  982. ServiceName: "grpc.testing.XdsUpdateClientConfigureService",
  983. HandlerType: (*XdsUpdateClientConfigureServiceServer)(nil),
  984. Methods: []grpc.MethodDesc{
  985. {
  986. MethodName: "Configure",
  987. Handler: _XdsUpdateClientConfigureService_Configure_Handler,
  988. },
  989. },
  990. Streams: []grpc.StreamDesc{},
  991. Metadata: "grpc/testing/test.proto",
  992. }