(key []byte, hashVal uint64)
| 307 | } |
| 308 | |
| 309 | func (seg *segment) del(key []byte, hashVal uint64) (affected bool) { |
| 310 | slotId := uint8(hashVal >> 8) |
| 311 | hash16 := uint16(hashVal >> 16) |
| 312 | slot := seg.getSlot(slotId) |
| 313 | idx, match := seg.lookup(slot, hash16, key) |
| 314 | if !match { |
| 315 | return false |
| 316 | } |
| 317 | seg.delEntryPtr(slotId, slot, idx) |
| 318 | return true |
| 319 | } |
| 320 | |
| 321 | func (seg *segment) ttl(key []byte, hashVal uint64) (timeLeft uint32, err error) { |
| 322 | slotId := uint8(hashVal >> 8) |
no test coverage detected