Documentation
¶
Index ¶
Constants ¶
View Source
const ( CompressedExt = ".gz" NormalExt = ".dat" )
Variables ¶
View Source
var (
ErrImmutableSegment = errors.New("the segment has been compressed and is now immutable")
)
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index interface {
Append(string, []byte) error
Read(string, func(io.Reader)) error
Exists(string) bool
Stats() IndexStats
Compact() error
}
Index is an append-only key-value
type IndexOpts ¶
type IndexOpts struct {
Dir string
IndexCleanupInterval time.Duration
CompactionInterval time.Duration
MaxSegmentIdlePeriod time.Duration
TimeToCompaction time.Duration
RetentionPeriod time.Duration
RetentionCheckInterval time.Duration
Logger *log.Logger
BloomfilterSize float64
BloomError float64
// contains filtered or unexported fields
}
IndexOpts contains options for creating the index. Defaults will be set so it is perfectly fine to pass an empty struct.
type IndexStats ¶
type IndexStats struct {
OpenSegments int64 `json:"open_segments"`
}
Click to show internal directories.
Click to hide internal directories.