Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/grafana-agent
Path: blob/main/pkg/agentproto/agent.pb.go
4094 views
1
// Code generated by protoc-gen-gogo. DO NOT EDIT.
2
// source: agent.proto
3
4
package agentproto
5
6
import (
7
context "context"
8
fmt "fmt"
9
proto "github.com/gogo/protobuf/proto"
10
empty "github.com/golang/protobuf/ptypes/empty"
11
grpc "google.golang.org/grpc"
12
codes "google.golang.org/grpc/codes"
13
status "google.golang.org/grpc/status"
14
io "io"
15
math "math"
16
math_bits "math/bits"
17
reflect "reflect"
18
strings "strings"
19
)
20
21
// Reference imports to suppress errors if they are not otherwise used.
22
var _ = proto.Marshal
23
var _ = fmt.Errorf
24
var _ = math.Inf
25
26
// This is a compile-time assertion to ensure that this generated file
27
// is compatible with the proto package it is being compiled against.
28
// A compilation error at this line likely means your copy of the
29
// proto package needs to be updated.
30
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
31
32
type ReshardRequest struct {
33
}
34
35
func (m *ReshardRequest) Reset() { *m = ReshardRequest{} }
36
func (*ReshardRequest) ProtoMessage() {}
37
func (*ReshardRequest) Descriptor() ([]byte, []int) {
38
return fileDescriptor_56ede974c0020f77, []int{0}
39
}
40
func (m *ReshardRequest) XXX_Unmarshal(b []byte) error {
41
return m.Unmarshal(b)
42
}
43
func (m *ReshardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
44
if deterministic {
45
return xxx_messageInfo_ReshardRequest.Marshal(b, m, deterministic)
46
} else {
47
b = b[:cap(b)]
48
n, err := m.MarshalToSizedBuffer(b)
49
if err != nil {
50
return nil, err
51
}
52
return b[:n], nil
53
}
54
}
55
func (m *ReshardRequest) XXX_Merge(src proto.Message) {
56
xxx_messageInfo_ReshardRequest.Merge(m, src)
57
}
58
func (m *ReshardRequest) XXX_Size() int {
59
return m.Size()
60
}
61
func (m *ReshardRequest) XXX_DiscardUnknown() {
62
xxx_messageInfo_ReshardRequest.DiscardUnknown(m)
63
}
64
65
var xxx_messageInfo_ReshardRequest proto.InternalMessageInfo
66
67
func init() {
68
proto.RegisterType((*ReshardRequest)(nil), "agentproto.ReshardRequest")
69
}
70
71
func init() { proto.RegisterFile("agent.proto", fileDescriptor_56ede974c0020f77) }
72
73
var fileDescriptor_56ede974c0020f77 = []byte{
74
// 220 bytes of a gzipped FileDescriptorProto
75
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0x4c, 0x4f, 0xcd,
76
0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x02, 0x73, 0xc0, 0x6c, 0x29, 0xe9, 0xf4,
77
0xfc, 0xfc, 0xf4, 0x9c, 0x54, 0x7d, 0x30, 0x2f, 0xa9, 0x34, 0x4d, 0x3f, 0x35, 0xb7, 0xa0, 0xa4,
78
0x12, 0xa2, 0x50, 0x49, 0x80, 0x8b, 0x2f, 0x28, 0xb5, 0x38, 0x23, 0xb1, 0x28, 0x25, 0x28, 0xb5,
79
0xb0, 0x34, 0xb5, 0xb8, 0xc4, 0x28, 0x80, 0x8b, 0x3f, 0x38, 0xb9, 0x28, 0xb1, 0x20, 0x33, 0x2f,
80
0x3d, 0x38, 0xb5, 0xa8, 0x2c, 0x33, 0x39, 0x55, 0xc8, 0x96, 0x8b, 0x1d, 0xaa, 0x48, 0x48, 0x4a,
81
0x0f, 0x61, 0xb2, 0x1e, 0xaa, 0x4e, 0x29, 0x31, 0x3d, 0x88, 0x4d, 0x7a, 0x30, 0x9b, 0xf4, 0x5c,
82
0x41, 0x36, 0x39, 0xc5, 0x5e, 0x78, 0x28, 0xc7, 0x70, 0xe3, 0xa1, 0x1c, 0xc3, 0x87, 0x87, 0x72,
83
0x8c, 0x0d, 0x8f, 0xe4, 0x18, 0x57, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23,
84
0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x5f, 0x3c, 0x92, 0x63, 0xf8, 0xf0, 0x48, 0x8e, 0x71, 0xc2,
85
0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52, 0x4f, 0xcf, 0x2c,
86
0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0x2f, 0x4a, 0x4c, 0x4b, 0xcc, 0x4b, 0xd4,
87
0x07, 0xdb, 0xad, 0x5f, 0x90, 0x9d, 0xae, 0x8f, 0x70, 0x45, 0x12, 0x1b, 0x98, 0x32, 0x06, 0x04,
88
0x00, 0x00, 0xff, 0xff, 0x15, 0xe9, 0x8a, 0xfc, 0x01, 0x01, 0x00, 0x00,
89
}
90
91
func (this *ReshardRequest) Equal(that interface{}) bool {
92
if that == nil {
93
return this == nil
94
}
95
96
that1, ok := that.(*ReshardRequest)
97
if !ok {
98
that2, ok := that.(ReshardRequest)
99
if ok {
100
that1 = &that2
101
} else {
102
return false
103
}
104
}
105
if that1 == nil {
106
return this == nil
107
} else if this == nil {
108
return false
109
}
110
return true
111
}
112
func (this *ReshardRequest) GoString() string {
113
if this == nil {
114
return "nil"
115
}
116
s := make([]string, 0, 4)
117
s = append(s, "&agentproto.ReshardRequest{")
118
s = append(s, "}")
119
return strings.Join(s, "")
120
}
121
func valueToGoStringAgent(v interface{}, typ string) string {
122
rv := reflect.ValueOf(v)
123
if rv.IsNil() {
124
return "nil"
125
}
126
pv := reflect.Indirect(rv).Interface()
127
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
128
}
129
130
// Reference imports to suppress errors if they are not otherwise used.
131
var _ context.Context
132
var _ grpc.ClientConn
133
134
// This is a compile-time assertion to ensure that this generated file
135
// is compatible with the grpc package it is being compiled against.
136
const _ = grpc.SupportPackageIsVersion4
137
138
// ScrapingServiceClient is the client API for ScrapingService service.
139
//
140
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
141
type ScrapingServiceClient interface {
142
// Reshard tells the implementing service to reshard all of its running
143
// configs.
144
Reshard(ctx context.Context, in *ReshardRequest, opts ...grpc.CallOption) (*empty.Empty, error)
145
}
146
147
type scrapingServiceClient struct {
148
cc *grpc.ClientConn
149
}
150
151
func NewScrapingServiceClient(cc *grpc.ClientConn) ScrapingServiceClient {
152
return &scrapingServiceClient{cc}
153
}
154
155
func (c *scrapingServiceClient) Reshard(ctx context.Context, in *ReshardRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
156
out := new(empty.Empty)
157
err := c.cc.Invoke(ctx, "/agentproto.ScrapingService/Reshard", in, out, opts...)
158
if err != nil {
159
return nil, err
160
}
161
return out, nil
162
}
163
164
// ScrapingServiceServer is the server API for ScrapingService service.
165
type ScrapingServiceServer interface {
166
// Reshard tells the implementing service to reshard all of its running
167
// configs.
168
Reshard(context.Context, *ReshardRequest) (*empty.Empty, error)
169
}
170
171
// UnimplementedScrapingServiceServer can be embedded to have forward compatible implementations.
172
type UnimplementedScrapingServiceServer struct {
173
}
174
175
func (*UnimplementedScrapingServiceServer) Reshard(ctx context.Context, req *ReshardRequest) (*empty.Empty, error) {
176
return nil, status.Errorf(codes.Unimplemented, "method Reshard not implemented")
177
}
178
179
func RegisterScrapingServiceServer(s *grpc.Server, srv ScrapingServiceServer) {
180
s.RegisterService(&_ScrapingService_serviceDesc, srv)
181
}
182
183
func _ScrapingService_Reshard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
184
in := new(ReshardRequest)
185
if err := dec(in); err != nil {
186
return nil, err
187
}
188
if interceptor == nil {
189
return srv.(ScrapingServiceServer).Reshard(ctx, in)
190
}
191
info := &grpc.UnaryServerInfo{
192
Server: srv,
193
FullMethod: "/agentproto.ScrapingService/Reshard",
194
}
195
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
196
return srv.(ScrapingServiceServer).Reshard(ctx, req.(*ReshardRequest))
197
}
198
return interceptor(ctx, in, info, handler)
199
}
200
201
var _ScrapingService_serviceDesc = grpc.ServiceDesc{
202
ServiceName: "agentproto.ScrapingService",
203
HandlerType: (*ScrapingServiceServer)(nil),
204
Methods: []grpc.MethodDesc{
205
{
206
MethodName: "Reshard",
207
Handler: _ScrapingService_Reshard_Handler,
208
},
209
},
210
Streams: []grpc.StreamDesc{},
211
Metadata: "agent.proto",
212
}
213
214
func (m *ReshardRequest) Marshal() (dAtA []byte, err error) {
215
size := m.Size()
216
dAtA = make([]byte, size)
217
n, err := m.MarshalToSizedBuffer(dAtA[:size])
218
if err != nil {
219
return nil, err
220
}
221
return dAtA[:n], nil
222
}
223
224
func (m *ReshardRequest) MarshalTo(dAtA []byte) (int, error) {
225
size := m.Size()
226
return m.MarshalToSizedBuffer(dAtA[:size])
227
}
228
229
func (m *ReshardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
230
i := len(dAtA)
231
_ = i
232
var l int
233
_ = l
234
return len(dAtA) - i, nil
235
}
236
237
func encodeVarintAgent(dAtA []byte, offset int, v uint64) int {
238
offset -= sovAgent(v)
239
base := offset
240
for v >= 1<<7 {
241
dAtA[offset] = uint8(v&0x7f | 0x80)
242
v >>= 7
243
offset++
244
}
245
dAtA[offset] = uint8(v)
246
return base
247
}
248
func (m *ReshardRequest) Size() (n int) {
249
if m == nil {
250
return 0
251
}
252
var l int
253
_ = l
254
return n
255
}
256
257
func sovAgent(x uint64) (n int) {
258
return (math_bits.Len64(x|1) + 6) / 7
259
}
260
func sozAgent(x uint64) (n int) {
261
return sovAgent(uint64((x << 1) ^ uint64((int64(x) >> 63))))
262
}
263
func (this *ReshardRequest) String() string {
264
if this == nil {
265
return "nil"
266
}
267
s := strings.Join([]string{`&ReshardRequest{`,
268
`}`,
269
}, "")
270
return s
271
}
272
func valueToStringAgent(v interface{}) string {
273
rv := reflect.ValueOf(v)
274
if rv.IsNil() {
275
return "nil"
276
}
277
pv := reflect.Indirect(rv).Interface()
278
return fmt.Sprintf("*%v", pv)
279
}
280
func (m *ReshardRequest) Unmarshal(dAtA []byte) error {
281
l := len(dAtA)
282
iNdEx := 0
283
for iNdEx < l {
284
preIndex := iNdEx
285
var wire uint64
286
for shift := uint(0); ; shift += 7 {
287
if shift >= 64 {
288
return ErrIntOverflowAgent
289
}
290
if iNdEx >= l {
291
return io.ErrUnexpectedEOF
292
}
293
b := dAtA[iNdEx]
294
iNdEx++
295
wire |= uint64(b&0x7F) << shift
296
if b < 0x80 {
297
break
298
}
299
}
300
fieldNum := int32(wire >> 3)
301
wireType := int(wire & 0x7)
302
if wireType == 4 {
303
return fmt.Errorf("proto: ReshardRequest: wiretype end group for non-group")
304
}
305
if fieldNum <= 0 {
306
return fmt.Errorf("proto: ReshardRequest: illegal tag %d (wire type %d)", fieldNum, wire)
307
}
308
switch fieldNum {
309
default:
310
iNdEx = preIndex
311
skippy, err := skipAgent(dAtA[iNdEx:])
312
if err != nil {
313
return err
314
}
315
if skippy < 0 {
316
return ErrInvalidLengthAgent
317
}
318
if (iNdEx + skippy) < 0 {
319
return ErrInvalidLengthAgent
320
}
321
if (iNdEx + skippy) > l {
322
return io.ErrUnexpectedEOF
323
}
324
iNdEx += skippy
325
}
326
}
327
328
if iNdEx > l {
329
return io.ErrUnexpectedEOF
330
}
331
return nil
332
}
333
func skipAgent(dAtA []byte) (n int, err error) {
334
l := len(dAtA)
335
iNdEx := 0
336
for iNdEx < l {
337
var wire uint64
338
for shift := uint(0); ; shift += 7 {
339
if shift >= 64 {
340
return 0, ErrIntOverflowAgent
341
}
342
if iNdEx >= l {
343
return 0, io.ErrUnexpectedEOF
344
}
345
b := dAtA[iNdEx]
346
iNdEx++
347
wire |= (uint64(b) & 0x7F) << shift
348
if b < 0x80 {
349
break
350
}
351
}
352
wireType := int(wire & 0x7)
353
switch wireType {
354
case 0:
355
for shift := uint(0); ; shift += 7 {
356
if shift >= 64 {
357
return 0, ErrIntOverflowAgent
358
}
359
if iNdEx >= l {
360
return 0, io.ErrUnexpectedEOF
361
}
362
iNdEx++
363
if dAtA[iNdEx-1] < 0x80 {
364
break
365
}
366
}
367
return iNdEx, nil
368
case 1:
369
iNdEx += 8
370
return iNdEx, nil
371
case 2:
372
var length int
373
for shift := uint(0); ; shift += 7 {
374
if shift >= 64 {
375
return 0, ErrIntOverflowAgent
376
}
377
if iNdEx >= l {
378
return 0, io.ErrUnexpectedEOF
379
}
380
b := dAtA[iNdEx]
381
iNdEx++
382
length |= (int(b) & 0x7F) << shift
383
if b < 0x80 {
384
break
385
}
386
}
387
if length < 0 {
388
return 0, ErrInvalidLengthAgent
389
}
390
iNdEx += length
391
if iNdEx < 0 {
392
return 0, ErrInvalidLengthAgent
393
}
394
return iNdEx, nil
395
case 3:
396
for {
397
var innerWire uint64
398
var start int = iNdEx
399
for shift := uint(0); ; shift += 7 {
400
if shift >= 64 {
401
return 0, ErrIntOverflowAgent
402
}
403
if iNdEx >= l {
404
return 0, io.ErrUnexpectedEOF
405
}
406
b := dAtA[iNdEx]
407
iNdEx++
408
innerWire |= (uint64(b) & 0x7F) << shift
409
if b < 0x80 {
410
break
411
}
412
}
413
innerWireType := int(innerWire & 0x7)
414
if innerWireType == 4 {
415
break
416
}
417
next, err := skipAgent(dAtA[start:])
418
if err != nil {
419
return 0, err
420
}
421
iNdEx = start + next
422
if iNdEx < 0 {
423
return 0, ErrInvalidLengthAgent
424
}
425
}
426
return iNdEx, nil
427
case 4:
428
return iNdEx, nil
429
case 5:
430
iNdEx += 4
431
return iNdEx, nil
432
default:
433
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
434
}
435
}
436
panic("unreachable")
437
}
438
439
var (
440
ErrInvalidLengthAgent = fmt.Errorf("proto: negative length found during unmarshaling")
441
ErrIntOverflowAgent = fmt.Errorf("proto: integer overflow")
442
)
443
444