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

Method getID

server/controller/prometheus/encoder/target.go:54–59  ·  view source on GitHub ↗
(key cache.TargetKey)

Source from the content-addressed store, hash-verified

52}
53
54func (ln *target) getID(key cache.TargetKey) (int, bool) {
55 if item, ok := ln.keyToID.Load(key); ok {
56 return item.(int), true
57 }
58 return 0, false
59}
60
61func (ln *target) refresh(args ...interface{}) error {
62 ln.lock.Lock()

Callers

nothing calls this directly

Calls 1

LoadMethod · 0.45

Tested by

no test coverage detected