metrics.pb.go 8.9 KB

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