MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / AddDelay

Method AddDelay

internal/iplibrary/ip_list.go:56–68  ·  view source on GitHub ↗
(item *IPItem)

Source from the content-addressed store, hash-verified

54}
55
56func (this *IPList) AddDelay(item *IPItem) {
57 if this.isDeleted || item == nil {
58 return
59 }
60
61 if !IsZero(item.IPTo) {
62 this.mu.Lock()
63 this.bufferItemsMap[item.Id] = item
64 this.mu.Unlock()
65 } else {
66 this.addItem(item, true, true)
67 }
68}
69
70func (this *IPList) Sort() {
71 this.mu.Lock()

Callers 5

processItemsMethod · 0.95
TestNewIPList_MemoryFunction · 0.80
TestIPList_Contains_ManyFunction · 0.80
BenchmarkIPList_AddFunction · 0.80
BenchmarkIPList_SortFunction · 0.80

Calls 4

addItemMethod · 0.95
IsZeroFunction · 0.85
LockMethod · 0.45
UnlockMethod · 0.45

Tested by 4

TestNewIPList_MemoryFunction · 0.64
TestIPList_Contains_ManyFunction · 0.64
BenchmarkIPList_AddFunction · 0.64
BenchmarkIPList_SortFunction · 0.64