Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SegmentCache ¶
type SegmentCache struct {
// contains filtered or unexported fields
}
SegmentCache provides an LRU cache keyed by topic/partition/baseOffset storing segment bytes.
func NewSegmentCache ¶
func NewSegmentCache(capacityBytes int) *SegmentCache
NewSegmentCache creates a cache with capacity in bytes.
func (*SegmentCache) GetSegment ¶
GetSegment returns cached data if present.
func (*SegmentCache) SetSegment ¶
func (c *SegmentCache) SetSegment(topic string, partition int32, baseOffset int64, data []byte)
SetSegment adds or updates a cache entry.
Click to show internal directories.
Click to hide internal directories.