MCPcopy
hub / github.com/coocood/freecache / delEntryPtrByOffset

Method delEntryPtrByOffset

segment.go:382–389  ·  view source on GitHub ↗
(slotId uint8, hash16 uint16, offset int64)

Source from the content-addressed store, hash-verified

380}
381
382func (seg *segment) delEntryPtrByOffset(slotId uint8, hash16 uint16, offset int64) {
383 slot := seg.getSlot(slotId)
384 idx, match := seg.lookupByOff(slot, hash16, offset)
385 if !match {
386 return
387 }
388 seg.delEntryPtr(slotId, slot, idx)
389}
390
391func (seg *segment) delEntryPtr(slotId uint8, slot []entryPtr, idx int) {
392 offset := slot[idx].offset

Callers 1

evacuateMethod · 0.95

Calls 3

getSlotMethod · 0.95
lookupByOffMethod · 0.95
delEntryPtrMethod · 0.95

Tested by

no test coverage detected