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

Method retrieve

netflow/v9/memcache.go:100–107  ·  view source on GitHub ↗
(id uint16, addr net.IP)

Source from the content-addressed store, hash-verified

98}
99
100func (m *MemCache) retrieve(id uint16, addr net.IP) (TemplateRecord, bool) {
101 shard, key := m.getShard(id, addr)
102 shard.RLock()
103 defer shard.RUnlock()
104 v, ok := shard.Templates[key]
105
106 return v.Template, ok
107}
108
109// Dump saves the current templates to hard disk
110func (m MemCache) Dump(cacheFile string) error {

Callers 1

decodeSetMethod · 0.45

Calls 1

getShardMethod · 0.95

Tested by

no test coverage detected