summaryrefslogtreecommitdiffstats
path: root/fluent-bit/lib/cmetrics/include/prometheus_remote_write/types.pb-c.h
blob: 25291c92efbde3970e6d9708d27613a23aff8070 (plain)
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
/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: types.proto */

#ifndef PROTOBUF_C_types_2eproto__INCLUDED
#define PROTOBUF_C_types_2eproto__INCLUDED

#include <prometheus_remote_write/protobuf-c.h>

PROTOBUF_C__BEGIN_DECLS

#if PROTOBUF_C_VERSION_NUMBER < 1003000
# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1003003 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
#endif

// #include "gogoproto/gogo.pb-c.h"

typedef struct _Prometheus__MetricMetadata Prometheus__MetricMetadata;
typedef struct _Prometheus__Sample Prometheus__Sample;
typedef struct _Prometheus__TimeSeries Prometheus__TimeSeries;
typedef struct _Prometheus__Label Prometheus__Label;
typedef struct _Prometheus__Labels Prometheus__Labels;
typedef struct _Prometheus__LabelMatcher Prometheus__LabelMatcher;
typedef struct _Prometheus__ReadHints Prometheus__ReadHints;
typedef struct _Prometheus__Chunk Prometheus__Chunk;
typedef struct _Prometheus__ChunkedSeries Prometheus__ChunkedSeries;


/* --- enums --- */

typedef enum _Prometheus__MetricMetadata__MetricType {
  PROMETHEUS__METRIC_METADATA__METRIC_TYPE__UNKNOWN = 0,
  PROMETHEUS__METRIC_METADATA__METRIC_TYPE__COUNTER = 1,
  PROMETHEUS__METRIC_METADATA__METRIC_TYPE__GAUGE = 2,
  PROMETHEUS__METRIC_METADATA__METRIC_TYPE__HISTOGRAM = 3,
  PROMETHEUS__METRIC_METADATA__METRIC_TYPE__GAUGEHISTOGRAM = 4,
  PROMETHEUS__METRIC_METADATA__METRIC_TYPE__SUMMARY = 5,
  PROMETHEUS__METRIC_METADATA__METRIC_TYPE__INFO = 6,
  PROMETHEUS__METRIC_METADATA__METRIC_TYPE__STATESET = 7
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(PROMETHEUS__METRIC_METADATA__METRIC_TYPE)
} Prometheus__MetricMetadata__MetricType;
typedef enum _Prometheus__LabelMatcher__Type {
  PROMETHEUS__LABEL_MATCHER__TYPE__EQ = 0,
  PROMETHEUS__LABEL_MATCHER__TYPE__NEQ = 1,
  PROMETHEUS__LABEL_MATCHER__TYPE__RE = 2,
  PROMETHEUS__LABEL_MATCHER__TYPE__NRE = 3
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(PROMETHEUS__LABEL_MATCHER__TYPE)
} Prometheus__LabelMatcher__Type;
/*
 * We require this to match chunkenc.Encoding.
 */
typedef enum _Prometheus__Chunk__Encoding {
  PROMETHEUS__CHUNK__ENCODING__UNKNOWN = 0,
  PROMETHEUS__CHUNK__ENCODING__XOR = 1
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(PROMETHEUS__CHUNK__ENCODING)
} Prometheus__Chunk__Encoding;

/* --- messages --- */

struct  _Prometheus__MetricMetadata
{
  ProtobufCMessage base;
  /*
   * Represents the metric type, these match the set from Prometheus.
   * Refer to pkg/textparse/interface.go for details.
   */
  Prometheus__MetricMetadata__MetricType type;
  char *metric_family_name;
  char *help;
  char *unit;
};
#define PROMETHEUS__METRIC_METADATA__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&prometheus__metric_metadata__descriptor) \
    , PROMETHEUS__METRIC_METADATA__METRIC_TYPE__UNKNOWN, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string }


struct  _Prometheus__Sample
{
  ProtobufCMessage base;
  double value;
  int64_t timestamp;
};
#define PROMETHEUS__SAMPLE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&prometheus__sample__descriptor) \
    , 0, 0 }


/*
 * TimeSeries represents samples and labels for a single time series.
 */
struct  _Prometheus__TimeSeries
{
  ProtobufCMessage base;
  size_t n_labels;
  Prometheus__Label **labels;
  size_t n_samples;
  Prometheus__Sample **samples;
};
#define PROMETHEUS__TIME_SERIES__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&prometheus__time_series__descriptor) \
    , 0,NULL, 0,NULL }


struct  _Prometheus__Label
{
  ProtobufCMessage base;
  char *name;
  char *value;
};
#define PROMETHEUS__LABEL__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&prometheus__label__descriptor) \
    , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string }


struct  _Prometheus__Labels
{
  ProtobufCMessage base;
  size_t n_labels;
  Prometheus__Label **labels;
};
#define PROMETHEUS__LABELS__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&prometheus__labels__descriptor) \
    , 0,NULL }


/*
 * Matcher specifies a rule, which can match or set of labels or not.
 */
struct  _Prometheus__LabelMatcher
{
  ProtobufCMessage base;
  Prometheus__LabelMatcher__Type type;
  char *name;
  char *value;
};
#define PROMETHEUS__LABEL_MATCHER__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&prometheus__label_matcher__descriptor) \
    , PROMETHEUS__LABEL_MATCHER__TYPE__EQ, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string }


struct  _Prometheus__ReadHints
{
  ProtobufCMessage base;
  /*
   * Query step size in milliseconds.
   */
  int64_t step_ms;
  /*
   * String representation of surrounding function or aggregation.
   */
  char *func;
  /*
   * Start time in milliseconds.
   */
  int64_t start_ms;
  /*
   * End time in milliseconds.
   */
  int64_t end_ms;
  /*
   * List of label names used in aggregation.
   */
  size_t n_grouping;
  char **grouping;
  /*
   * Indicate whether it is without or by.
   */
  protobuf_c_boolean by;
  /*
   * Range vector selector range in milliseconds.
   */
  int64_t range_ms;
};
#define PROMETHEUS__READ_HINTS__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&prometheus__read_hints__descriptor) \
    , 0, (char *)protobuf_c_empty_string, 0, 0, 0,NULL, 0, 0 }


/*
 * Chunk represents a TSDB chunk.
 * Time range [min, max] is inclusive.
 */
struct  _Prometheus__Chunk
{
  ProtobufCMessage base;
  int64_t min_time_ms;
  int64_t max_time_ms;
  Prometheus__Chunk__Encoding type;
  ProtobufCBinaryData data;
};
#define PROMETHEUS__CHUNK__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&prometheus__chunk__descriptor) \
    , 0, 0, PROMETHEUS__CHUNK__ENCODING__UNKNOWN, {0,NULL} }


/*
 * ChunkedSeries represents single, encoded time series.
 */
struct  _Prometheus__ChunkedSeries
{
  ProtobufCMessage base;
  /*
   * Labels should be sorted.
   */
  size_t n_labels;
  Prometheus__Label **labels;
  /*
   * Chunks will be in start time order and may overlap.
   */
  size_t n_chunks;
  Prometheus__Chunk **chunks;
};
#define PROMETHEUS__CHUNKED_SERIES__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&prometheus__chunked_series__descriptor) \
    , 0,NULL, 0,NULL }


/* Prometheus__MetricMetadata methods */
void   prometheus__metric_metadata__init
                     (Prometheus__MetricMetadata         *message);
size_t prometheus__metric_metadata__get_packed_size
                     (const Prometheus__MetricMetadata   *message);
size_t prometheus__metric_metadata__pack
                     (const Prometheus__MetricMetadata   *message,
                      uint8_t             *out);
size_t prometheus__metric_metadata__pack_to_buffer
                     (const Prometheus__MetricMetadata   *message,
                      ProtobufCBuffer     *buffer);
Prometheus__MetricMetadata *
       prometheus__metric_metadata__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   prometheus__metric_metadata__free_unpacked
                     (Prometheus__MetricMetadata *message,
                      ProtobufCAllocator *allocator);
/* Prometheus__Sample methods */
void   prometheus__sample__init
                     (Prometheus__Sample         *message);
size_t prometheus__sample__get_packed_size
                     (const Prometheus__Sample   *message);
size_t prometheus__sample__pack
                     (const Prometheus__Sample   *message,
                      uint8_t             *out);
size_t prometheus__sample__pack_to_buffer
                     (const Prometheus__Sample   *message,
                      ProtobufCBuffer     *buffer);
Prometheus__Sample *
       prometheus__sample__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   prometheus__sample__free_unpacked
                     (Prometheus__Sample *message,
                      ProtobufCAllocator *allocator);
/* Prometheus__TimeSeries methods */
void   prometheus__time_series__init
                     (Prometheus__TimeSeries         *message);
size_t prometheus__time_series__get_packed_size
                     (const Prometheus__TimeSeries   *message);
size_t prometheus__time_series__pack
                     (const Prometheus__TimeSeries   *message,
                      uint8_t             *out);
size_t prometheus__time_series__pack_to_buffer
                     (const Prometheus__TimeSeries   *message,
                      ProtobufCBuffer     *buffer);
Prometheus__TimeSeries *
       prometheus__time_series__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   prometheus__time_series__free_unpacked
                     (Prometheus__TimeSeries *message,
                      ProtobufCAllocator *allocator);
/* Prometheus__Label methods */
void   prometheus__label__init
                     (Prometheus__Label         *message);
size_t prometheus__label__get_packed_size
                     (const Prometheus__Label   *message);
size_t prometheus__label__pack
                     (const Prometheus__Label   *message,
                      uint8_t             *out);
size_t prometheus__label__pack_to_buffer
                     (const Prometheus__Label   *message,
                      ProtobufCBuffer     *buffer);
Prometheus__Label *
       prometheus__label__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   prometheus__label__free_unpacked
                     (Prometheus__Label *message,
                      ProtobufCAllocator *allocator);
/* Prometheus__Labels methods */
void   prometheus__labels__init
                     (Prometheus__Labels         *message);
size_t prometheus__labels__get_packed_size
                     (const Prometheus__Labels   *message);
size_t prometheus__labels__pack
                     (const Prometheus__Labels   *message,
                      uint8_t             *out);
size_t prometheus__labels__pack_to_buffer
                     (const Prometheus__Labels   *message,
                      ProtobufCBuffer     *buffer);
Prometheus__Labels *
       prometheus__labels__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   prometheus__labels__free_unpacked
                     (Prometheus__Labels *message,
                      ProtobufCAllocator *allocator);
/* Prometheus__LabelMatcher methods */
void   prometheus__label_matcher__init
                     (Prometheus__LabelMatcher         *message);
size_t prometheus__label_matcher__get_packed_size
                     (const Prometheus__LabelMatcher   *message);
size_t prometheus__label_matcher__pack
                     (const Prometheus__LabelMatcher   *message,
                      uint8_t             *out);
size_t prometheus__label_matcher__pack_to_buffer
                     (const Prometheus__LabelMatcher   *message,
                      ProtobufCBuffer     *buffer);
Prometheus__LabelMatcher *
       prometheus__label_matcher__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   prometheus__label_matcher__free_unpacked
                     (Prometheus__LabelMatcher *message,
                      ProtobufCAllocator *allocator);
/* Prometheus__ReadHints methods */
void   prometheus__read_hints__init
                     (Prometheus__ReadHints         *message);
size_t prometheus__read_hints__get_packed_size
                     (const Prometheus__ReadHints   *message);
size_t prometheus__read_hints__pack
                     (const Prometheus__ReadHints   *message,
                      uint8_t             *out);
size_t prometheus__read_hints__pack_to_buffer
                     (const Prometheus__ReadHints   *message,
                      ProtobufCBuffer     *buffer);
Prometheus__ReadHints *
       prometheus__read_hints__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   prometheus__read_hints__free_unpacked
                     (Prometheus__ReadHints *message,
                      ProtobufCAllocator *allocator);
/* Prometheus__Chunk methods */
void   prometheus__chunk__init
                     (Prometheus__Chunk         *message);
size_t prometheus__chunk__get_packed_size
                     (const Prometheus__Chunk   *message);
size_t prometheus__chunk__pack
                     (const Prometheus__Chunk   *message,
                      uint8_t             *out);
size_t prometheus__chunk__pack_to_buffer
                     (const Prometheus__Chunk   *message,
                      ProtobufCBuffer     *buffer);
Prometheus__Chunk *
       prometheus__chunk__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   prometheus__chunk__free_unpacked
                     (Prometheus__Chunk *message,
                      ProtobufCAllocator *allocator);
/* Prometheus__ChunkedSeries methods */
void   prometheus__chunked_series__init
                     (Prometheus__ChunkedSeries         *message);
size_t prometheus__chunked_series__get_packed_size
                     (const Prometheus__ChunkedSeries   *message);
size_t prometheus__chunked_series__pack
                     (const Prometheus__ChunkedSeries   *message,
                      uint8_t             *out);
size_t prometheus__chunked_series__pack_to_buffer
                     (const Prometheus__ChunkedSeries   *message,
                      ProtobufCBuffer     *buffer);
Prometheus__ChunkedSeries *
       prometheus__chunked_series__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   prometheus__chunked_series__free_unpacked
                     (Prometheus__ChunkedSeries *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*Prometheus__MetricMetadata_Closure)
                 (const Prometheus__MetricMetadata *message,
                  void *closure_data);
typedef void (*Prometheus__Sample_Closure)
                 (const Prometheus__Sample *message,
                  void *closure_data);
typedef void (*Prometheus__TimeSeries_Closure)
                 (const Prometheus__TimeSeries *message,
                  void *closure_data);
typedef void (*Prometheus__Label_Closure)
                 (const Prometheus__Label *message,
                  void *closure_data);
typedef void (*Prometheus__Labels_Closure)
                 (const Prometheus__Labels *message,
                  void *closure_data);
typedef void (*Prometheus__LabelMatcher_Closure)
                 (const Prometheus__LabelMatcher *message,
                  void *closure_data);
typedef void (*Prometheus__ReadHints_Closure)
                 (const Prometheus__ReadHints *message,
                  void *closure_data);
typedef void (*Prometheus__Chunk_Closure)
                 (const Prometheus__Chunk *message,
                  void *closure_data);
typedef void (*Prometheus__ChunkedSeries_Closure)
                 (const Prometheus__ChunkedSeries *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCMessageDescriptor prometheus__metric_metadata__descriptor;
extern const ProtobufCEnumDescriptor    prometheus__metric_metadata__metric_type__descriptor;
extern const ProtobufCMessageDescriptor prometheus__sample__descriptor;
extern const ProtobufCMessageDescriptor prometheus__time_series__descriptor;
extern const ProtobufCMessageDescriptor prometheus__label__descriptor;
extern const ProtobufCMessageDescriptor prometheus__labels__descriptor;
extern const ProtobufCMessageDescriptor prometheus__label_matcher__descriptor;
extern const ProtobufCEnumDescriptor    prometheus__label_matcher__type__descriptor;
extern const ProtobufCMessageDescriptor prometheus__read_hints__descriptor;
extern const ProtobufCMessageDescriptor prometheus__chunk__descriptor;
extern const ProtobufCEnumDescriptor    prometheus__chunk__encoding__descriptor;
extern const ProtobufCMessageDescriptor prometheus__chunked_series__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_types_2eproto__INCLUDED */