| 1 |
// Code generated by protoc-gen-go. |
| 2 |
// source: metrics.proto |
| 3 |
// DO NOT EDIT! |
| 4 |
|
| 5 |
/* |
| 6 |
Package io_prometheus_client is a generated protocol buffer package. |
| 7 |
|
| 8 |
It is generated from these files: |
| 9 |
metrics.proto |
| 10 |
|
| 11 |
It has these top-level messages: |
| 12 |
LabelPair |
| 13 |
Gauge |
| 14 |
Counter |
| 15 |
Quantile |
| 16 |
Summary |
| 17 |
Untyped |
| 18 |
Histogram |
| 19 |
Bucket |
| 20 |
Metric |
| 21 |
MetricFamily |
| 22 |
*/ |
| 23 |
package io_prometheus_client |
| 24 |
|
| 25 |
import proto "github.com/golang/protobuf/proto" |
| 26 |
import math "math" |
| 27 |
|
| 28 |
// Reference imports to suppress errors if they are not otherwise used. |
| 29 |
var _ = proto.Marshal |
| 30 |
var _ = math.Inf |
| 31 |
|
| 32 |
type MetricType int32 |
| 33 |
|
| 34 |
const ( |
| 35 |
MetricType_COUNTER MetricType = 0 |
| 36 |
MetricType_GAUGE MetricType = 1 |
| 37 |
MetricType_SUMMARY MetricType = 2 |
| 38 |
MetricType_UNTYPED MetricType = 3 |
| 39 |
MetricType_HISTOGRAM MetricType = 4 |
| 40 |
) |
| 41 |
|
| 42 |
var MetricType_name = map[int32]string{ |
| 43 |
0: "COUNTER", |
| 44 |
1: "GAUGE", |
| 45 |
2: "SUMMARY", |
| 46 |
3: "UNTYPED", |
| 47 |
4: "HISTOGRAM", |
| 48 |
} |
| 49 |
var MetricType_value = map[string]int32{ |
| 50 |
"COUNTER": 0, |
| 51 |
"GAUGE": 1, |
| 52 |
"SUMMARY": 2, |
| 53 |
"UNTYPED": 3, |
| 54 |
"HISTOGRAM": 4, |
| 55 |
} |
| 56 |
|
| 57 |
func (x MetricType) Enum() *MetricType { |
| 58 |
p := new(MetricType) |
| 59 |
*p = x |
| 60 |
return p |
| 61 |
} |
| 62 |
func (x MetricType) String() string { |
| 63 |
return proto.EnumName(MetricType_name, int32(x)) |
| 64 |
} |
| 65 |
func (x *MetricType) UnmarshalJSON(data []byte) error { |
| 66 |
value, err := proto.UnmarshalJSONEnum(MetricType_value, data, "MetricType") |
| 67 |
if err != nil { |
| 68 |
return err |
| 69 |
} |
| 70 |
*x = MetricType(value) |
| 71 |
return nil |
| 72 |
} |
| 73 |
|
| 74 |
type LabelPair struct { |
| 75 |
Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` |
| 76 |
Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` |
| 77 |
XXX_unrecognized []byte `json:"-"` |
| 78 |
} |
| 79 |
|
| 80 |
func (m *LabelPair) Reset() { *m = LabelPair{} } |
| 81 |
func (m *LabelPair) String() string { return proto.CompactTextString(m) } |
| 82 |
func (*LabelPair) ProtoMessage() {} |
| 83 |
|
| 84 |
func (m *LabelPair) GetName() string { |
| 85 |
if m != nil && m.Name != nil { |
| 86 |
return *m.Name |
| 87 |
} |
| 88 |
return "" |
| 89 |
} |
| 90 |
|
| 91 |
func (m *LabelPair) GetValue() string { |
| 92 |
if m != nil && m.Value != nil { |
| 93 |
return *m.Value |
| 94 |
} |
| 95 |
return "" |
| 96 |
} |
| 97 |
|
| 98 |
type Gauge struct { |
| 99 |
Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` |
| 100 |
XXX_unrecognized []byte `json:"-"` |
| 101 |
} |
| 102 |
|
| 103 |
func (m *Gauge) Reset() { *m = Gauge{} } |
| 104 |
func (m *Gauge) String() string { return proto.CompactTextString(m) } |
| 105 |
func (*Gauge) ProtoMessage() {} |
| 106 |
|
| 107 |
func (m *Gauge) GetValue() float64 { |
| 108 |
if m != nil && m.Value != nil { |
| 109 |
return *m.Value |
| 110 |
} |
| 111 |
return 0 |
| 112 |
} |
| 113 |
|
| 114 |
type Counter struct { |
| 115 |
Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` |
| 116 |
XXX_unrecognized []byte `json:"-"` |
| 117 |
} |
| 118 |
|
| 119 |
func (m *Counter) Reset() { *m = Counter{} } |
| 120 |
func (m *Counter) String() string { return proto.CompactTextString(m) } |
| 121 |
func (*Counter) ProtoMessage() {} |
| 122 |
|
| 123 |
func (m *Counter) GetValue() float64 { |
| 124 |
if m != nil && m.Value != nil { |
| 125 |
return *m.Value |
| 126 |
} |
| 127 |
return 0 |
| 128 |
} |
| 129 |
|
| 130 |
type Quantile struct { |
| 131 |
Quantile *float64 `protobuf:"fixed64,1,opt,name=quantile" json:"quantile,omitempty"` |
| 132 |
Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"` |
| 133 |
XXX_unrecognized []byte `json:"-"` |
| 134 |
} |
| 135 |
|
| 136 |
func (m *Quantile) Reset() { *m = Quantile{} } |
| 137 |
func (m *Quantile) String() string { return proto.CompactTextString(m) } |
| 138 |
func (*Quantile) ProtoMessage() {} |
| 139 |
|
| 140 |
func (m *Quantile) GetQuantile() float64 { |
| 141 |
if m != nil && m.Quantile != nil { |
| 142 |
return *m.Quantile |
| 143 |
} |
| 144 |
return 0 |
| 145 |
} |
| 146 |
|
| 147 |
func (m *Quantile) GetValue() float64 { |
| 148 |
if m != nil && m.Value != nil { |
| 149 |
return *m.Value |
| 150 |
} |
| 151 |
return 0 |
| 152 |
} |
| 153 |
|
| 154 |
type Summary struct { |
| 155 |
SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count" json:"sample_count,omitempty"` |
| 156 |
SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum" json:"sample_sum,omitempty"` |
| 157 |
Quantile []*Quantile `protobuf:"bytes,3,rep,name=quantile" json:"quantile,omitempty"` |
| 158 |
XXX_unrecognized []byte `json:"-"` |
| 159 |
} |
| 160 |
|
| 161 |
func (m *Summary) Reset() { *m = Summary{} } |
| 162 |
func (m *Summary) String() string { return proto.CompactTextString(m) } |
| 163 |
func (*Summary) ProtoMessage() {} |
| 164 |
|
| 165 |
func (m *Summary) GetSampleCount() uint64 { |
| 166 |
if m != nil && m.SampleCount != nil { |
| 167 |
return *m.SampleCount |
| 168 |
} |
| 169 |
return 0 |
| 170 |
} |
| 171 |
|
| 172 |
func (m *Summary) GetSampleSum() float64 { |
| 173 |
if m != nil && m.SampleSum != nil { |
| 174 |
return *m.SampleSum |
| 175 |
} |
| 176 |
return 0 |
| 177 |
} |
| 178 |
|
| 179 |
func (m *Summary) GetQuantile() []*Quantile { |
| 180 |
if m != nil { |
| 181 |
return m.Quantile |
| 182 |
} |
| 183 |
return nil |
| 184 |
} |
| 185 |
|
| 186 |
type Untyped struct { |
| 187 |
Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` |
| 188 |
XXX_unrecognized []byte `json:"-"` |
| 189 |
} |
| 190 |
|
| 191 |
func (m *Untyped) Reset() { *m = Untyped{} } |
| 192 |
func (m *Untyped) String() string { return proto.CompactTextString(m) } |
| 193 |
func (*Untyped) ProtoMessage() {} |
| 194 |
|
| 195 |
func (m *Untyped) GetValue() float64 { |
| 196 |
if m != nil && m.Value != nil { |
| 197 |
return *m.Value |
| 198 |
} |
| 199 |
return 0 |
| 200 |
} |
| 201 |
|
| 202 |
type Histogram struct { |
| 203 |
SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count" json:"sample_count,omitempty"` |
| 204 |
SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum" json:"sample_sum,omitempty"` |
| 205 |
Bucket []*Bucket `protobuf:"bytes,3,rep,name=bucket" json:"bucket,omitempty"` |
| 206 |
XXX_unrecognized []byte `json:"-"` |
| 207 |
} |
| 208 |
|
| 209 |
func (m *Histogram) Reset() { *m = Histogram{} } |
| 210 |
func (m *Histogram) String() string { return proto.CompactTextString(m) } |
| 211 |
func (*Histogram) ProtoMessage() {} |
| 212 |
|
| 213 |
func (m *Histogram) GetSampleCount() uint64 { |
| 214 |
if m != nil && m.SampleCount != nil { |
| 215 |
return *m.SampleCount |
| 216 |
} |
| 217 |
return 0 |
| 218 |
} |
| 219 |
|
| 220 |
func (m *Histogram) GetSampleSum() float64 { |
| 221 |
if m != nil && m.SampleSum != nil { |
| 222 |
return *m.SampleSum |
| 223 |
} |
| 224 |
return 0 |
| 225 |
} |
| 226 |
|
| 227 |
func (m *Histogram) GetBucket() []*Bucket { |
| 228 |
if m != nil { |
| 229 |
return m.Bucket |
| 230 |
} |
| 231 |
return nil |
| 232 |
} |
| 233 |
|
| 234 |
type Bucket struct { |
| 235 |
CumulativeCount *uint64 `protobuf:"varint,1,opt,name=cumulative_count" json:"cumulative_count,omitempty"` |
| 236 |
UpperBound *float64 `protobuf:"fixed64,2,opt,name=upper_bound" json:"upper_bound,omitempty"` |
| 237 |
XXX_unrecognized []byte `json:"-"` |
| 238 |
} |
| 239 |
|
| 240 |
func (m *Bucket) Reset() { *m = Bucket{} } |
| 241 |
func (m *Bucket) String() string { return proto.CompactTextString(m) } |
| 242 |
func (*Bucket) ProtoMessage() {} |
| 243 |
|
| 244 |
func (m *Bucket) GetCumulativeCount() uint64 { |
| 245 |
if m != nil && m.CumulativeCount != nil { |
| 246 |
return *m.CumulativeCount |
| 247 |
} |
| 248 |
return 0 |
| 249 |
} |
| 250 |
|
| 251 |
func (m *Bucket) GetUpperBound() float64 { |
| 252 |
if m != nil && m.UpperBound != nil { |
| 253 |
return *m.UpperBound |
| 254 |
} |
| 255 |
return 0 |
| 256 |
} |
| 257 |
|
| 258 |
type Metric struct { |
| 259 |
Label []*LabelPair `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"` |
| 260 |
Gauge *Gauge `protobuf:"bytes,2,opt,name=gauge" json:"gauge,omitempty"` |
| 261 |
Counter *Counter `protobuf:"bytes,3,opt,name=counter" json:"counter,omitempty"` |
| 262 |
Summary *Summary `protobuf:"bytes,4,opt,name=summary" json:"summary,omitempty"` |
| 263 |
Untyped *Untyped `protobuf:"bytes,5,opt,name=untyped" json:"untyped,omitempty"` |
| 264 |
Histogram *Histogram `protobuf:"bytes,7,opt,name=histogram" json:"histogram,omitempty"` |
| 265 |
TimestampMs *int64 `protobuf:"varint,6,opt,name=timestamp_ms" json:"timestamp_ms,omitempty"` |
| 266 |
XXX_unrecognized []byte `json:"-"` |
| 267 |
} |
| 268 |
|
| 269 |
func (m *Metric) Reset() { *m = Metric{} } |
| 270 |
func (m *Metric) String() string { return proto.CompactTextString(m) } |
| 271 |
func (*Metric) ProtoMessage() {} |
| 272 |
|
| 273 |
func (m *Metric) GetLabel() []*LabelPair { |
| 274 |
if m != nil { |
| 275 |
return m.Label |
| 276 |
} |
| 277 |
return nil |
| 278 |
} |
| 279 |
|
| 280 |
func (m *Metric) GetGauge() *Gauge { |
| 281 |
if m != nil { |
| 282 |
return m.Gauge |
| 283 |
} |
| 284 |
return nil |
| 285 |
} |
| 286 |
|
| 287 |
func (m *Metric) GetCounter() *Counter { |
| 288 |
if m != nil { |
| 289 |
return m.Counter |
| 290 |
} |
| 291 |
return nil |
| 292 |
} |
| 293 |
|
| 294 |
func (m *Metric) GetSummary() *Summary { |
| 295 |
if m != nil { |
| 296 |
return m.Summary |
| 297 |
} |
| 298 |
return nil |
| 299 |
} |
| 300 |
|
| 301 |
func (m *Metric) GetUntyped() *Untyped { |
| 302 |
if m != nil { |
| 303 |
return m.Untyped |
| 304 |
} |
| 305 |
return nil |
| 306 |
} |
| 307 |
|
| 308 |
func (m *Metric) GetHistogram() *Histogram { |
| 309 |
if m != nil { |
| 310 |
return m.Histogram |
| 311 |
} |
| 312 |
return nil |
| 313 |
} |
| 314 |
|
| 315 |
func (m *Metric) GetTimestampMs() int64 { |
| 316 |
if m != nil && m.TimestampMs != nil { |
| 317 |
return *m.TimestampMs |
| 318 |
} |
| 319 |
return 0 |
| 320 |
} |
| 321 |
|
| 322 |
type MetricFamily struct { |
| 323 |
Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` |
| 324 |
Help *string `protobuf:"bytes,2,opt,name=help" json:"help,omitempty"` |
| 325 |
Type *MetricType `protobuf:"varint,3,opt,name=type,enum=io.prometheus.client.MetricType" json:"type,omitempty"` |
| 326 |
Metric []*Metric `protobuf:"bytes,4,rep,name=metric" json:"metric,omitempty"` |
| 327 |
XXX_unrecognized []byte `json:"-"` |
| 328 |
} |
| 329 |
|
| 330 |
func (m *MetricFamily) Reset() { *m = MetricFamily{} } |
| 331 |
func (m *MetricFamily) String() string { return proto.CompactTextString(m) } |
| 332 |
func (*MetricFamily) ProtoMessage() {} |
| 333 |
|
| 334 |
func (m *MetricFamily) GetName() string { |
| 335 |
if m != nil && m.Name != nil { |
| 336 |
return *m.Name |
| 337 |
} |
| 338 |
return "" |
| 339 |
} |
| 340 |
|
| 341 |
func (m *MetricFamily) GetHelp() string { |
| 342 |
if m != nil && m.Help != nil { |
| 343 |
return *m.Help |
| 344 |
} |
| 345 |
return "" |
| 346 |
} |
| 347 |
|
| 348 |
func (m *MetricFamily) GetType() MetricType { |
| 349 |
if m != nil && m.Type != nil { |
| 350 |
return *m.Type |
| 351 |
} |
| 352 |
return MetricType_COUNTER |
| 353 |
} |
| 354 |
|
| 355 |
func (m *MetricFamily) GetMetric() []*Metric { |
| 356 |
if m != nil { |
| 357 |
return m.Metric |
| 358 |
} |
| 359 |
return nil |
| 360 |
} |
| 361 |
|
| 362 |
func init() { |
| 363 |
proto.RegisterEnum("io.prometheus.client.MetricType", MetricType_name, MetricType_value) |
| 364 |
} |