MCPcopy Create free account
hub / github.com/Edgio/vflow / retrieve

Method retrieve

ipfix/memcache.go:101–108  ·  view source on GitHub ↗
(id uint16, addr net.IP)

Source from the content-addressed store, hash-verified

99}
100
101func (m MemCache) retrieve(id uint16, addr net.IP) (TemplateRecord, bool) {
102 shard, key := m.getShard(id, addr)
103 shard.RLock()
104 defer shard.RUnlock()
105 v, ok := shard.Templates[key]
106
107 return v.Template, ok
108}
109
110// Fill a slice with all known set ids. This is inefficient and is only used for error reporting or debugging.
111func (m MemCache) allSetIds() []int {

Callers 4

decodeSetMethod · 0.45
GetMethod · 0.45
TestMemCacheRetrieveFunction · 0.45
TestMemCacheInsertFunction · 0.45

Calls 1

getShardMethod · 0.95

Tested by 2

TestMemCacheRetrieveFunction · 0.36
TestMemCacheInsertFunction · 0.36