File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
staging/src/k8s.io/component-base/metrics Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -149,3 +149,17 @@ func (v *CounterVec) With(labels prometheus.Labels) CounterMetric {
149
149
}
150
150
return v .CounterVec .With (labels )
151
151
}
152
+
153
+ // Delete deletes the metric where the variable labels are the same as those
154
+ // passed in as labels. It returns true if a metric was deleted.
155
+ //
156
+ // It is not an error if the number and names of the Labels are inconsistent
157
+ // with those of the VariableLabels in Desc. However, such inconsistent Labels
158
+ // can never match an actual metric, so the method will always return false in
159
+ // that case.
160
+ func (v * CounterVec ) Delete (labels prometheus.Labels ) bool {
161
+ if ! v .IsCreated () {
162
+ return false // since we haven't created the metric, we haven't deleted a metric with the passed in values
163
+ }
164
+ return v .CounterVec .Delete (labels )
165
+ }
You can’t perform that action at this time.
0 commit comments