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

Method remove

internal/waf/ip_list.go:315–326  ·  view source on GitHub ↗
(id uint64)

Source from the content-addressed store, hash-verified

313}
314
315func (this *IPList) remove(id uint64) {
316 this.locker.Lock()
317 ip, ok := this.idMap[id]
318 if ok {
319 ipId, ok := this.ipMap[ip]
320 if ok && ipId == id {
321 delete(this.ipMap, ip)
322 }
323 delete(this.idMap, id)
324 }
325 this.locker.Unlock()
326}
327
328func (this *IPList) nextId() uint64 {
329 return atomic.AddUint64(&this.id, 1)

Callers 1

NewIPListFunction · 0.45

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected