-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_grpc.pb.go
624 lines (552 loc) · 20.9 KB
/
test_grpc.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.20.1
// source: test.proto
package test
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// TestServiceClient is the client API for TestService service.
//
// 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.
type TestServiceClient interface {
PingEmpty(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PingResponse, error)
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
PingError(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
PingList(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (TestService_PingListClient, error)
PingPongBidi(ctx context.Context, opts ...grpc.CallOption) (TestService_PingPongBidiClient, error)
PingStream(ctx context.Context, opts ...grpc.CallOption) (TestService_PingStreamClient, error)
Echo(ctx context.Context, in *TextMessage, opts ...grpc.CallOption) (*TextMessage, error)
}
type testServiceClient struct {
cc grpc.ClientConnInterface
}
func NewTestServiceClient(cc grpc.ClientConnInterface) TestServiceClient {
return &testServiceClient{cc}
}
func (c *testServiceClient) PingEmpty(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PingResponse, error) {
out := new(PingResponse)
err := c.cc.Invoke(ctx, "/test.TestService/PingEmpty", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) {
out := new(PingResponse)
err := c.cc.Invoke(ctx, "/test.TestService/Ping", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testServiceClient) PingError(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/test.TestService/PingError", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testServiceClient) PingList(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (TestService_PingListClient, error) {
stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[0], "/test.TestService/PingList", opts...)
if err != nil {
return nil, err
}
x := &testServicePingListClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type TestService_PingListClient interface {
Recv() (*PingResponse, error)
grpc.ClientStream
}
type testServicePingListClient struct {
grpc.ClientStream
}
func (x *testServicePingListClient) Recv() (*PingResponse, error) {
m := new(PingResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *testServiceClient) PingPongBidi(ctx context.Context, opts ...grpc.CallOption) (TestService_PingPongBidiClient, error) {
stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[1], "/test.TestService/PingPongBidi", opts...)
if err != nil {
return nil, err
}
x := &testServicePingPongBidiClient{stream}
return x, nil
}
type TestService_PingPongBidiClient interface {
Send(*PingRequest) error
Recv() (*PingResponse, error)
grpc.ClientStream
}
type testServicePingPongBidiClient struct {
grpc.ClientStream
}
func (x *testServicePingPongBidiClient) Send(m *PingRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *testServicePingPongBidiClient) Recv() (*PingResponse, error) {
m := new(PingResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *testServiceClient) PingStream(ctx context.Context, opts ...grpc.CallOption) (TestService_PingStreamClient, error) {
stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[2], "/test.TestService/PingStream", opts...)
if err != nil {
return nil, err
}
x := &testServicePingStreamClient{stream}
return x, nil
}
type TestService_PingStreamClient interface {
Send(*PingRequest) error
CloseAndRecv() (*PingResponse, error)
grpc.ClientStream
}
type testServicePingStreamClient struct {
grpc.ClientStream
}
func (x *testServicePingStreamClient) Send(m *PingRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *testServicePingStreamClient) CloseAndRecv() (*PingResponse, error) {
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
m := new(PingResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *testServiceClient) Echo(ctx context.Context, in *TextMessage, opts ...grpc.CallOption) (*TextMessage, error) {
out := new(TextMessage)
err := c.cc.Invoke(ctx, "/test.TestService/Echo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TestServiceServer is the server API for TestService service.
// All implementations must embed UnimplementedTestServiceServer
// for forward compatibility
type TestServiceServer interface {
PingEmpty(context.Context, *emptypb.Empty) (*PingResponse, error)
Ping(context.Context, *PingRequest) (*PingResponse, error)
PingError(context.Context, *PingRequest) (*emptypb.Empty, error)
PingList(*PingRequest, TestService_PingListServer) error
PingPongBidi(TestService_PingPongBidiServer) error
PingStream(TestService_PingStreamServer) error
Echo(context.Context, *TextMessage) (*TextMessage, error)
mustEmbedUnimplementedTestServiceServer()
}
// UnimplementedTestServiceServer must be embedded to have forward compatible implementations.
type UnimplementedTestServiceServer struct {
}
func (UnimplementedTestServiceServer) PingEmpty(context.Context, *emptypb.Empty) (*PingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PingEmpty not implemented")
}
func (UnimplementedTestServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
}
func (UnimplementedTestServiceServer) PingError(context.Context, *PingRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method PingError not implemented")
}
func (UnimplementedTestServiceServer) PingList(*PingRequest, TestService_PingListServer) error {
return status.Errorf(codes.Unimplemented, "method PingList not implemented")
}
func (UnimplementedTestServiceServer) PingPongBidi(TestService_PingPongBidiServer) error {
return status.Errorf(codes.Unimplemented, "method PingPongBidi not implemented")
}
func (UnimplementedTestServiceServer) PingStream(TestService_PingStreamServer) error {
return status.Errorf(codes.Unimplemented, "method PingStream not implemented")
}
func (UnimplementedTestServiceServer) Echo(context.Context, *TextMessage) (*TextMessage, error) {
return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented")
}
func (UnimplementedTestServiceServer) mustEmbedUnimplementedTestServiceServer() {}
// UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TestServiceServer will
// result in compilation errors.
type UnsafeTestServiceServer interface {
mustEmbedUnimplementedTestServiceServer()
}
func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer) {
s.RegisterService(&TestService_ServiceDesc, srv)
}
func _TestService_PingEmpty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestServiceServer).PingEmpty(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/test.TestService/PingEmpty",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestServiceServer).PingEmpty(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _TestService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PingRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestServiceServer).Ping(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/test.TestService/Ping",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestServiceServer).Ping(ctx, req.(*PingRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestService_PingError_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PingRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestServiceServer).PingError(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/test.TestService/PingError",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestServiceServer).PingError(ctx, req.(*PingRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestService_PingList_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(PingRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(TestServiceServer).PingList(m, &testServicePingListServer{stream})
}
type TestService_PingListServer interface {
Send(*PingResponse) error
grpc.ServerStream
}
type testServicePingListServer struct {
grpc.ServerStream
}
func (x *testServicePingListServer) Send(m *PingResponse) error {
return x.ServerStream.SendMsg(m)
}
func _TestService_PingPongBidi_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(TestServiceServer).PingPongBidi(&testServicePingPongBidiServer{stream})
}
type TestService_PingPongBidiServer interface {
Send(*PingResponse) error
Recv() (*PingRequest, error)
grpc.ServerStream
}
type testServicePingPongBidiServer struct {
grpc.ServerStream
}
func (x *testServicePingPongBidiServer) Send(m *PingResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *testServicePingPongBidiServer) Recv() (*PingRequest, error) {
m := new(PingRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _TestService_PingStream_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(TestServiceServer).PingStream(&testServicePingStreamServer{stream})
}
type TestService_PingStreamServer interface {
SendAndClose(*PingResponse) error
Recv() (*PingRequest, error)
grpc.ServerStream
}
type testServicePingStreamServer struct {
grpc.ServerStream
}
func (x *testServicePingStreamServer) SendAndClose(m *PingResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *testServicePingStreamServer) Recv() (*PingRequest, error) {
m := new(PingRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _TestService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TextMessage)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestServiceServer).Echo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/test.TestService/Echo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestServiceServer).Echo(ctx, req.(*TextMessage))
}
return interceptor(ctx, in, info, handler)
}
// TestService_ServiceDesc is the grpc.ServiceDesc for TestService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TestService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "test.TestService",
HandlerType: (*TestServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "PingEmpty",
Handler: _TestService_PingEmpty_Handler,
},
{
MethodName: "Ping",
Handler: _TestService_Ping_Handler,
},
{
MethodName: "PingError",
Handler: _TestService_PingError_Handler,
},
{
MethodName: "Echo",
Handler: _TestService_Echo_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "PingList",
Handler: _TestService_PingList_Handler,
ServerStreams: true,
},
{
StreamName: "PingPongBidi",
Handler: _TestService_PingPongBidi_Handler,
ServerStreams: true,
ClientStreams: true,
},
{
StreamName: "PingStream",
Handler: _TestService_PingStream_Handler,
ClientStreams: true,
},
},
Metadata: "test.proto",
}
// TestUtilServiceClient is the client API for TestUtilService service.
//
// 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.
type TestUtilServiceClient interface {
ContinueStream(ctx context.Context, in *ContinueStreamRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
CheckStreamClosed(ctx context.Context, in *CheckStreamClosedRequest, opts ...grpc.CallOption) (*CheckStreamClosedResponse, error)
}
type testUtilServiceClient struct {
cc grpc.ClientConnInterface
}
func NewTestUtilServiceClient(cc grpc.ClientConnInterface) TestUtilServiceClient {
return &testUtilServiceClient{cc}
}
func (c *testUtilServiceClient) ContinueStream(ctx context.Context, in *ContinueStreamRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/test.TestUtilService/ContinueStream", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *testUtilServiceClient) CheckStreamClosed(ctx context.Context, in *CheckStreamClosedRequest, opts ...grpc.CallOption) (*CheckStreamClosedResponse, error) {
out := new(CheckStreamClosedResponse)
err := c.cc.Invoke(ctx, "/test.TestUtilService/CheckStreamClosed", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TestUtilServiceServer is the server API for TestUtilService service.
// All implementations must embed UnimplementedTestUtilServiceServer
// for forward compatibility
type TestUtilServiceServer interface {
ContinueStream(context.Context, *ContinueStreamRequest) (*emptypb.Empty, error)
CheckStreamClosed(context.Context, *CheckStreamClosedRequest) (*CheckStreamClosedResponse, error)
mustEmbedUnimplementedTestUtilServiceServer()
}
// UnimplementedTestUtilServiceServer must be embedded to have forward compatible implementations.
type UnimplementedTestUtilServiceServer struct {
}
func (UnimplementedTestUtilServiceServer) ContinueStream(context.Context, *ContinueStreamRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ContinueStream not implemented")
}
func (UnimplementedTestUtilServiceServer) CheckStreamClosed(context.Context, *CheckStreamClosedRequest) (*CheckStreamClosedResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckStreamClosed not implemented")
}
func (UnimplementedTestUtilServiceServer) mustEmbedUnimplementedTestUtilServiceServer() {}
// UnsafeTestUtilServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TestUtilServiceServer will
// result in compilation errors.
type UnsafeTestUtilServiceServer interface {
mustEmbedUnimplementedTestUtilServiceServer()
}
func RegisterTestUtilServiceServer(s grpc.ServiceRegistrar, srv TestUtilServiceServer) {
s.RegisterService(&TestUtilService_ServiceDesc, srv)
}
func _TestUtilService_ContinueStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ContinueStreamRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestUtilServiceServer).ContinueStream(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/test.TestUtilService/ContinueStream",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestUtilServiceServer).ContinueStream(ctx, req.(*ContinueStreamRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TestUtilService_CheckStreamClosed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CheckStreamClosedRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TestUtilServiceServer).CheckStreamClosed(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/test.TestUtilService/CheckStreamClosed",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TestUtilServiceServer).CheckStreamClosed(ctx, req.(*CheckStreamClosedRequest))
}
return interceptor(ctx, in, info, handler)
}
// TestUtilService_ServiceDesc is the grpc.ServiceDesc for TestUtilService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TestUtilService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "test.TestUtilService",
HandlerType: (*TestUtilServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ContinueStream",
Handler: _TestUtilService_ContinueStream_Handler,
},
{
MethodName: "CheckStreamClosed",
Handler: _TestUtilService_CheckStreamClosed_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "test.proto",
}
// FailServiceClient is the client API for FailService service.
//
// 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.
type FailServiceClient interface {
NonExistant(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
}
type failServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFailServiceClient(cc grpc.ClientConnInterface) FailServiceClient {
return &failServiceClient{cc}
}
func (c *failServiceClient) NonExistant(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) {
out := new(PingResponse)
err := c.cc.Invoke(ctx, "/test.FailService/NonExistant", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FailServiceServer is the server API for FailService service.
// All implementations must embed UnimplementedFailServiceServer
// for forward compatibility
type FailServiceServer interface {
NonExistant(context.Context, *PingRequest) (*PingResponse, error)
mustEmbedUnimplementedFailServiceServer()
}
// UnimplementedFailServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFailServiceServer struct {
}
func (UnimplementedFailServiceServer) NonExistant(context.Context, *PingRequest) (*PingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NonExistant not implemented")
}
func (UnimplementedFailServiceServer) mustEmbedUnimplementedFailServiceServer() {}
// UnsafeFailServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FailServiceServer will
// result in compilation errors.
type UnsafeFailServiceServer interface {
mustEmbedUnimplementedFailServiceServer()
}
func RegisterFailServiceServer(s grpc.ServiceRegistrar, srv FailServiceServer) {
s.RegisterService(&FailService_ServiceDesc, srv)
}
func _FailService_NonExistant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PingRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FailServiceServer).NonExistant(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/test.FailService/NonExistant",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FailServiceServer).NonExistant(ctx, req.(*PingRequest))
}
return interceptor(ctx, in, info, handler)
}
// FailService_ServiceDesc is the grpc.ServiceDesc for FailService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FailService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "test.FailService",
HandlerType: (*FailServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "NonExistant",
Handler: _FailService_NonExistant_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "test.proto",
}