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

Method insert

netflow/v9/memcache.go:93–98  ·  view source on GitHub ↗
(id uint16, addr net.IP, tr TemplateRecord)

Source from the content-addressed store, hash-verified

91}
92
93func (m *MemCache) insert(id uint16, addr net.IP, tr TemplateRecord) {
94 shard, key := m.getShard(id, addr)
95 shard.Lock()
96 defer shard.Unlock()
97 shard.Templates[key] = Data{tr, time.Now().Unix()}
98}
99
100func (m *MemCache) retrieve(id uint16, addr net.IP) (TemplateRecord, bool) {
101 shard, key := m.getShard(id, addr)

Callers 1

decodeSetMethod · 0.45

Calls 1

getShardMethod · 0.95

Tested by

no test coverage detected