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

Method Add

server/controller/prometheus/cache/target.go:169–173  ·  view source on GitHub ↗
(batch []*controller.PrometheusTarget)

Source from the content-addressed store, hash-verified

167}
168
169func (t *target) Add(batch []*controller.PrometheusTarget) {
170 for _, item := range batch {
171 t.keyToTargetID.Store(NewTargetKey(item.GetInstance(), item.GetJob(), int(item.GetEpcId()), int(item.GetPodClusterId())), int(item.GetId()))
172 }
173}
174
175func (t *target) GetTargetIDToLabelNames() map[int]mapset.Set[string] {
176 return t.targetIDToLabelNames.Get()

Callers

nothing calls this directly

Calls 2

NewTargetKeyFunction · 0.85
StoreMethod · 0.80

Tested by

no test coverage detected