-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRpc_grpc.pb.go
More file actions
582 lines (523 loc) · 18.4 KB
/
Rpc_grpc.pb.go
File metadata and controls
582 lines (523 loc) · 18.4 KB
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
// @project The EOS Open Storage
// @brief The EOS gRPC API, used by CTA and CERNBox
// @copyright Copyright 2024 CERN
// @license This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// NOTE: Compile for Go with:
// protoc ./eos_grpc.proto --go_out=plugins=grpc:.
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: Rpc.proto
package go_eosgrpc
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// 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
const (
Eos_Ping_FullMethodName = "/eos.rpc.Eos/Ping"
Eos_Notify_FullMethodName = "/eos.rpc.Eos/Notify"
Eos_MD_FullMethodName = "/eos.rpc.Eos/MD"
Eos_Notification_FullMethodName = "/eos.rpc.Eos/Notification"
Eos_Find_FullMethodName = "/eos.rpc.Eos/Find"
Eos_NsStat_FullMethodName = "/eos.rpc.Eos/NsStat"
Eos_ContainerInsert_FullMethodName = "/eos.rpc.Eos/ContainerInsert"
Eos_FileInsert_FullMethodName = "/eos.rpc.Eos/FileInsert"
Eos_Exec_FullMethodName = "/eos.rpc.Eos/Exec"
Eos_TrafficShapingRate_FullMethodName = "/eos.rpc.Eos/TrafficShapingRate"
)
// EosClient is the client API for Eos 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 EosClient interface {
// Replies to a ping
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingReply, error)
// Replies to a notification
Notify(ctx context.Context, in *NotificationRequest, opts ...grpc.CallOption) (*NotificationResponse, error)
// Replies to MD requests with a stream
MD(ctx context.Context, in *MDRequest, opts ...grpc.CallOption) (Eos_MDClient, error)
Notification(ctx context.Context, in *NotificationRequest, opts ...grpc.CallOption) (Eos_NotificationClient, error)
// Replies to Find requests with a stream
Find(ctx context.Context, in *FindRequest, opts ...grpc.CallOption) (Eos_FindClient, error)
// Replies to a NsStat operation
NsStat(ctx context.Context, in *NsStatRequest, opts ...grpc.CallOption) (*NsStatResponse, error)
// Replies to an insert
ContainerInsert(ctx context.Context, in *ContainerInsertRequest, opts ...grpc.CallOption) (*InsertReply, error)
FileInsert(ctx context.Context, in *FileInsertRequest, opts ...grpc.CallOption) (*InsertReply, error)
// Replies to a NsRequest operation
Exec(ctx context.Context, in *NSRequest, opts ...grpc.CallOption) (*NSResponse, error)
TrafficShapingRate(ctx context.Context, in *TrafficShapingRateRequest, opts ...grpc.CallOption) (Eos_TrafficShapingRateClient, error)
}
type eosClient struct {
cc grpc.ClientConnInterface
}
func NewEosClient(cc grpc.ClientConnInterface) EosClient {
return &eosClient{cc}
}
func (c *eosClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingReply, error) {
out := new(PingReply)
err := c.cc.Invoke(ctx, Eos_Ping_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *eosClient) Notify(ctx context.Context, in *NotificationRequest, opts ...grpc.CallOption) (*NotificationResponse, error) {
out := new(NotificationResponse)
err := c.cc.Invoke(ctx, Eos_Notify_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *eosClient) MD(ctx context.Context, in *MDRequest, opts ...grpc.CallOption) (Eos_MDClient, error) {
stream, err := c.cc.NewStream(ctx, &Eos_ServiceDesc.Streams[0], Eos_MD_FullMethodName, opts...)
if err != nil {
return nil, err
}
x := &eosMDClient{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 Eos_MDClient interface {
Recv() (*MDResponse, error)
grpc.ClientStream
}
type eosMDClient struct {
grpc.ClientStream
}
func (x *eosMDClient) Recv() (*MDResponse, error) {
m := new(MDResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *eosClient) Notification(ctx context.Context, in *NotificationRequest, opts ...grpc.CallOption) (Eos_NotificationClient, error) {
stream, err := c.cc.NewStream(ctx, &Eos_ServiceDesc.Streams[1], Eos_Notification_FullMethodName, opts...)
if err != nil {
return nil, err
}
x := &eosNotificationClient{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 Eos_NotificationClient interface {
Recv() (*NotificationResponse, error)
grpc.ClientStream
}
type eosNotificationClient struct {
grpc.ClientStream
}
func (x *eosNotificationClient) Recv() (*NotificationResponse, error) {
m := new(NotificationResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *eosClient) Find(ctx context.Context, in *FindRequest, opts ...grpc.CallOption) (Eos_FindClient, error) {
stream, err := c.cc.NewStream(ctx, &Eos_ServiceDesc.Streams[2], Eos_Find_FullMethodName, opts...)
if err != nil {
return nil, err
}
x := &eosFindClient{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 Eos_FindClient interface {
Recv() (*MDResponse, error)
grpc.ClientStream
}
type eosFindClient struct {
grpc.ClientStream
}
func (x *eosFindClient) Recv() (*MDResponse, error) {
m := new(MDResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *eosClient) NsStat(ctx context.Context, in *NsStatRequest, opts ...grpc.CallOption) (*NsStatResponse, error) {
out := new(NsStatResponse)
err := c.cc.Invoke(ctx, Eos_NsStat_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *eosClient) ContainerInsert(ctx context.Context, in *ContainerInsertRequest, opts ...grpc.CallOption) (*InsertReply, error) {
out := new(InsertReply)
err := c.cc.Invoke(ctx, Eos_ContainerInsert_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *eosClient) FileInsert(ctx context.Context, in *FileInsertRequest, opts ...grpc.CallOption) (*InsertReply, error) {
out := new(InsertReply)
err := c.cc.Invoke(ctx, Eos_FileInsert_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *eosClient) Exec(ctx context.Context, in *NSRequest, opts ...grpc.CallOption) (*NSResponse, error) {
out := new(NSResponse)
err := c.cc.Invoke(ctx, Eos_Exec_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *eosClient) TrafficShapingRate(ctx context.Context, in *TrafficShapingRateRequest, opts ...grpc.CallOption) (Eos_TrafficShapingRateClient, error) {
stream, err := c.cc.NewStream(ctx, &Eos_ServiceDesc.Streams[3], Eos_TrafficShapingRate_FullMethodName, opts...)
if err != nil {
return nil, err
}
x := &eosTrafficShapingRateClient{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 Eos_TrafficShapingRateClient interface {
Recv() (*TrafficShapingRateResponse, error)
grpc.ClientStream
}
type eosTrafficShapingRateClient struct {
grpc.ClientStream
}
func (x *eosTrafficShapingRateClient) Recv() (*TrafficShapingRateResponse, error) {
m := new(TrafficShapingRateResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// EosServer is the server API for Eos service.
// All implementations should embed UnimplementedEosServer
// for forward compatibility
type EosServer interface {
// Replies to a ping
Ping(context.Context, *PingRequest) (*PingReply, error)
// Replies to a notification
Notify(context.Context, *NotificationRequest) (*NotificationResponse, error)
// Replies to MD requests with a stream
MD(*MDRequest, Eos_MDServer) error
Notification(*NotificationRequest, Eos_NotificationServer) error
// Replies to Find requests with a stream
Find(*FindRequest, Eos_FindServer) error
// Replies to a NsStat operation
NsStat(context.Context, *NsStatRequest) (*NsStatResponse, error)
// Replies to an insert
ContainerInsert(context.Context, *ContainerInsertRequest) (*InsertReply, error)
FileInsert(context.Context, *FileInsertRequest) (*InsertReply, error)
// Replies to a NsRequest operation
Exec(context.Context, *NSRequest) (*NSResponse, error)
TrafficShapingRate(*TrafficShapingRateRequest, Eos_TrafficShapingRateServer) error
}
// UnimplementedEosServer should be embedded to have forward compatible implementations.
type UnimplementedEosServer struct {
}
func (UnimplementedEosServer) Ping(context.Context, *PingRequest) (*PingReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
}
func (UnimplementedEosServer) Notify(context.Context, *NotificationRequest) (*NotificationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Notify not implemented")
}
func (UnimplementedEosServer) MD(*MDRequest, Eos_MDServer) error {
return status.Errorf(codes.Unimplemented, "method MD not implemented")
}
func (UnimplementedEosServer) Notification(*NotificationRequest, Eos_NotificationServer) error {
return status.Errorf(codes.Unimplemented, "method Notification not implemented")
}
func (UnimplementedEosServer) Find(*FindRequest, Eos_FindServer) error {
return status.Errorf(codes.Unimplemented, "method Find not implemented")
}
func (UnimplementedEosServer) NsStat(context.Context, *NsStatRequest) (*NsStatResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NsStat not implemented")
}
func (UnimplementedEosServer) ContainerInsert(context.Context, *ContainerInsertRequest) (*InsertReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ContainerInsert not implemented")
}
func (UnimplementedEosServer) FileInsert(context.Context, *FileInsertRequest) (*InsertReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method FileInsert not implemented")
}
func (UnimplementedEosServer) Exec(context.Context, *NSRequest) (*NSResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented")
}
func (UnimplementedEosServer) TrafficShapingRate(*TrafficShapingRateRequest, Eos_TrafficShapingRateServer) error {
return status.Errorf(codes.Unimplemented, "method TrafficShapingRate not implemented")
}
// UnsafeEosServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EosServer will
// result in compilation errors.
type UnsafeEosServer interface {
mustEmbedUnimplementedEosServer()
}
func RegisterEosServer(s grpc.ServiceRegistrar, srv EosServer) {
s.RegisterService(&Eos_ServiceDesc, srv)
}
func _Eos_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.(EosServer).Ping(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Eos_Ping_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EosServer).Ping(ctx, req.(*PingRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Eos_Notify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NotificationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EosServer).Notify(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Eos_Notify_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EosServer).Notify(ctx, req.(*NotificationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Eos_MD_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(MDRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(EosServer).MD(m, &eosMDServer{stream})
}
type Eos_MDServer interface {
Send(*MDResponse) error
grpc.ServerStream
}
type eosMDServer struct {
grpc.ServerStream
}
func (x *eosMDServer) Send(m *MDResponse) error {
return x.ServerStream.SendMsg(m)
}
func _Eos_Notification_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(NotificationRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(EosServer).Notification(m, &eosNotificationServer{stream})
}
type Eos_NotificationServer interface {
Send(*NotificationResponse) error
grpc.ServerStream
}
type eosNotificationServer struct {
grpc.ServerStream
}
func (x *eosNotificationServer) Send(m *NotificationResponse) error {
return x.ServerStream.SendMsg(m)
}
func _Eos_Find_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(FindRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(EosServer).Find(m, &eosFindServer{stream})
}
type Eos_FindServer interface {
Send(*MDResponse) error
grpc.ServerStream
}
type eosFindServer struct {
grpc.ServerStream
}
func (x *eosFindServer) Send(m *MDResponse) error {
return x.ServerStream.SendMsg(m)
}
func _Eos_NsStat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NsStatRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EosServer).NsStat(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Eos_NsStat_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EosServer).NsStat(ctx, req.(*NsStatRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Eos_ContainerInsert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ContainerInsertRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EosServer).ContainerInsert(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Eos_ContainerInsert_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EosServer).ContainerInsert(ctx, req.(*ContainerInsertRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Eos_FileInsert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FileInsertRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EosServer).FileInsert(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Eos_FileInsert_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EosServer).FileInsert(ctx, req.(*FileInsertRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Eos_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NSRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EosServer).Exec(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Eos_Exec_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EosServer).Exec(ctx, req.(*NSRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Eos_TrafficShapingRate_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(TrafficShapingRateRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(EosServer).TrafficShapingRate(m, &eosTrafficShapingRateServer{stream})
}
type Eos_TrafficShapingRateServer interface {
Send(*TrafficShapingRateResponse) error
grpc.ServerStream
}
type eosTrafficShapingRateServer struct {
grpc.ServerStream
}
func (x *eosTrafficShapingRateServer) Send(m *TrafficShapingRateResponse) error {
return x.ServerStream.SendMsg(m)
}
// Eos_ServiceDesc is the grpc.ServiceDesc for Eos service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Eos_ServiceDesc = grpc.ServiceDesc{
ServiceName: "eos.rpc.Eos",
HandlerType: (*EosServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Ping",
Handler: _Eos_Ping_Handler,
},
{
MethodName: "Notify",
Handler: _Eos_Notify_Handler,
},
{
MethodName: "NsStat",
Handler: _Eos_NsStat_Handler,
},
{
MethodName: "ContainerInsert",
Handler: _Eos_ContainerInsert_Handler,
},
{
MethodName: "FileInsert",
Handler: _Eos_FileInsert_Handler,
},
{
MethodName: "Exec",
Handler: _Eos_Exec_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "MD",
Handler: _Eos_MD_Handler,
ServerStreams: true,
},
{
StreamName: "Notification",
Handler: _Eos_Notification_Handler,
ServerStreams: true,
},
{
StreamName: "Find",
Handler: _Eos_Find_Handler,
ServerStreams: true,
},
{
StreamName: "TrafficShapingRate",
Handler: _Eos_TrafficShapingRate_Handler,
ServerStreams: true,
},
},
Metadata: "Rpc.proto",
}