Update dependency go modules for k8s v1.26.0-rc.0
This commit is contained in:
10
vendor/k8s.io/component-base/metrics/value.go
generated
vendored
10
vendor/k8s.io/component-base/metrics/value.go
generated
vendored
@@ -47,6 +47,16 @@ func NewLazyConstMetric(desc *Desc, valueType ValueType, value float64, labelVal
|
||||
return prometheus.MustNewConstMetric(desc.toPrometheusDesc(), valueType.toPromValueType(), value, labelValues...)
|
||||
}
|
||||
|
||||
// NewConstMetric is a helper of NewConstMetric.
|
||||
//
|
||||
// Note: If the metrics described by the desc is hidden, the metrics will not be created.
|
||||
func NewConstMetric(desc *Desc, valueType ValueType, value float64, labelValues ...string) (Metric, error) {
|
||||
if desc.IsHidden() {
|
||||
return nil, nil
|
||||
}
|
||||
return prometheus.NewConstMetric(desc.toPrometheusDesc(), valueType.toPromValueType(), value, labelValues...)
|
||||
}
|
||||
|
||||
// NewLazyMetricWithTimestamp is a helper of NewMetricWithTimestamp.
|
||||
//
|
||||
// Warning: the Metric 'm' must be the one created by NewLazyConstMetric(),
|
||||
|
Reference in New Issue
Block a user