Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deepflowio/deepflow
/ Load
Method
Load
server/controller/prometheus/cache/target.go:64–69 ·
view source on GitHub ↗
(tk TargetKey)
Source
from the content-addressed store, hash-verified
62
}
63
64
func
(k *keyToTargetID) Load(tk TargetKey) (int, bool) {
65
k.lock.Lock()
66
defer
k.lock.Unlock()
67
id, ok := k.data[tk]
68
return
id, ok
69
}
70
71
func
(k *keyToTargetID) Get()
map
[TargetKey]int {
72
k.lock.Lock()
Callers
13
getActive
Method · 0.45
GetValueByID
Method · 0.45
getActive
Method · 0.45
GetIDByKey
Method · 0.45
GetLabelNamesByID
Method · 0.45
getActive
Method · 0.45
getActive
Method · 0.45
GetNameByID
Method · 0.45
getActive
Method · 0.45
TestConcurrentLabel_ReadDuringSwap
Function · 0.45
TestConcurrentLabelValue_ReadDuringSwap
Function · 0.45
getID
Method · 0.45
Calls
2
Lock
Method · 0.45
Unlock
Method · 0.45
Tested by
2
TestConcurrentLabel_ReadDuringSwap
Function · 0.36
TestConcurrentLabelValue_ReadDuringSwap
Function · 0.36