MCPcopy
hub / github.com/kubernetes/node-problem-detector / AddMapping

Method AddMapping

pkg/util/metrics/metric.go:86–91  ·  view source on GitHub ↗
(metricID MetricID, viewName string)

Source from the content-addressed store, hash-verified

84}
85
86func (mm *MetricMapping) AddMapping(metricID MetricID, viewName string) {
87 mm.mapMutex.Lock()
88 defer mm.mapMutex.Unlock()
89
90 mm.viewNameToMetricIDMap[viewName] = metricID
91}
92
93func (mm *MetricMapping) ViewNameToMetricID(viewName string) (MetricID, bool) {
94 mm.mapMutex.RLock()

Callers 2

NewInt64MetricFunction · 0.80
NewFloat64MetricFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected