(name, help string, labelNames []string)
| 53 | } |
| 54 | |
| 55 | func NewInfoVec(name, help string, labelNames []string) *InfoVec { |
| 56 | desc := prometheus.NewDesc(name, help, labelNames, nil) |
| 57 | return &InfoVec{ |
| 58 | MetricVec: prometheus.NewMetricVec(desc, func(lvs ...string) prometheus.Metric { |
| 59 | if len(lvs) != len(labelNames) { |
| 60 | panic("inconsistent label cardinality") |
| 61 | } |
| 62 | return Info{desc: desc, labelPairs: prometheus.MakeLabelPairs(desc, lvs)} |
| 63 | }), |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | func (v *InfoVec) GetMetricWithLabelValues(lvs ...string) (Info, error) { |
| 68 | metric, err := v.MetricVec.GetMetricWithLabelValues(lvs...) |
no test coverage detected