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

Function NewIPCacheMap

internal/utils/agents/ip_cache_map.go:18–26  ·  view source on GitHub ↗
(maxLen int)

Source from the content-addressed store, hash-verified

16}
17
18func NewIPCacheMap(maxLen int) *IPCacheMap {
19 if maxLen <= 0 {
20 maxLen = 65535
21 }
22 return &IPCacheMap{
23 m: map[string]zero.Zero{},
24 maxLen: maxLen,
25 }
26}
27
28func (this *IPCacheMap) Add(ip string) {
29 this.locker.Lock()

Callers 2

TestNewIPCacheMapFunction · 0.85
NewQueueFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestNewIPCacheMapFunction · 0.68