Documentation
¶
Index ¶
- func Filename(index int) string
- func Index(filename string) int
- type HashIndex
- type LogDB
- func (db *LogDB) Aggregate() map[string][]byte
- func (db *LogDB) Get(key string) ([]byte, bool)
- func (db *LogDB) GetAllUnique() map[string][]byte
- func (db *LogDB) MustSet(key string, value []byte)
- func (db *LogDB) RunSegmentations(ctx context.Context, segmentationInterval time.Duration)
- func (db *LogDB) Set(key string, value []byte) error
- type Record
- type RecordWithOffset
- type Segment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogDB ¶
LogDB is a simple key-value store that persists data to a log file.
func (*LogDB) Aggregate ¶
Aggregate gathers all the unique key-value pairs in the database, and then removes all the segments and resets the state.
func (*LogDB) GetAllUnique ¶
func (*LogDB) RunSegmentations ¶
RunSegmentations starts the database's compaction process.
type RecordWithOffset ¶
RecordWithOffset holds a record and its offset in the log file.
Click to show internal directories.
Click to hide internal directories.