IntervalCache is a cache which supports querying of intervals which match a key or range of keys. It is backed by an interval tree. See comments in UnorderedCache for more details on cache functionality. Note that the IntervalCache allow multiple identical segments, as specified by start and end ke
| 533 | // |
| 534 | // IntervalCache is not safe for concurrent access. |
| 535 | type IntervalCache struct { |
| 536 | baseCache |
| 537 | tree interval.Tree |
| 538 | logErrorf IntervalCacheLogErrorf |
| 539 | |
| 540 | // The fields below are used to avoid allocations during get, del and |
| 541 | // GetOverlaps. |
| 542 | getID uintptr |
| 543 | getEntry *Entry |
| 544 | overlapKey IntervalKey |
| 545 | overlaps []*Entry |
| 546 | } |
| 547 | |
| 548 | // IntervalCacheLogErrorf is a hook that is called on certain errors in the IntervalCache. |
| 549 | // This is used to prevent an import to util/log. |
nothing calls this directly
no outgoing calls
no test coverage detected