MCPcopy Create free account
hub / github.com/deepflowio/deepflow / Add

Method Add

server/controller/prometheus/cache/label.go:145–155  ·  view source on GitHub ↗
(batch []*controller.PrometheusLabel)

Source from the content-addressed store, hash-verified

143}
144
145func (l *label) Add(batch []*controller.PrometheusLabel) {
146 l.mu.Lock()
147 defer l.mu.Unlock()
148 for _, item := range batch {
149 nameID, ok1 := l.labelName.GetIDByName(item.GetName())
150 valueID, ok2 := l.labelValue.GetIDByValue(item.GetValue())
151 if ok1 && ok2 {
152 l.pending[IDLabelKey{NameID: nameID, ValueID: valueID}] = int(item.GetId())
153 }
154 }
155}
156
157func (l *label) refresh(args ...interface{}) error {
158 var count int64

Callers 15

getRDSInstancesMethod · 0.45
generateIPsAndSubnetsMethod · 0.45
GetVPCsMethod · 0.45
getRegionAndAZsMethod · 0.45
getPodGroupsMethod · 0.45
getVInterfacesAndIPsMethod · 0.45
GetMethod · 0.45
GetVTapPortsCountFunction · 0.45

Calls 6

GetIDByValueMethod · 0.80
GetNameMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45
GetIDByNameMethod · 0.45
GetValueMethod · 0.45