DeletePartialMatch deletes all metrics where the variable labels contain all of those passed in as labels. The order of the labels does not matter. It returns the number of metrics deleted. Note that curried labels will never be matched if deleting from the curried vector. To match curried labels w
(labels Labels)
| 111 | // Note that curried labels will never be matched if deleting from the curried vector. |
| 112 | // To match curried labels with DeletePartialMatch, it must be called on the base vector. |
| 113 | func (m *MetricVec) DeletePartialMatch(labels Labels) int { |
| 114 | labels, closer := constrainLabels(m.desc, labels) |
| 115 | defer closer() |
| 116 | |
| 117 | return m.deleteByLabels(labels, m.curry) |
| 118 | } |
| 119 | |
| 120 | // Without explicit forwarding of Describe, Collect, Reset, those methods won't |
| 121 | // show up in GoDoc. |