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

Method removeItem

internal/utils/expires/list.go:145–159  ·  view source on GitHub ↗
(itemId uint64)

Source from the content-addressed store, hash-verified

143}
144
145func (this *List) removeItem(itemId uint64) {
146 expiresAt, ok := this.itemsMap[itemId]
147 if !ok {
148 return
149 }
150 delete(this.itemsMap, itemId)
151
152 expireItemMap, ok := this.expireMap[expiresAt]
153 if ok {
154 delete(expireItemMap, itemId)
155 if len(expireItemMap) == 0 {
156 delete(this.expireMap, expiresAt)
157 }
158 }
159}
160
161func (this *List) gcItems(timestamp int64) ItemMap {
162 this.mu.RLock()

Callers 1

RemoveMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected