Documentation ¶
Index ¶
- Variables
- type FileDB
- func (fdb *FileDB) Close()
- func (f *FileDB) Merge(items ...interface{}) (uint, error)
- func (f *FileDB) MergeFile(filename string) (uint, error)
- func (f *FileDB) MergeReader(reader io.Reader) (uint, error)
- func (fdb *FileDB) Process() error
- func (fdb *FileDB) Reset() error
- func (fdb *FileDB) Scan(handler func([]byte, []byte) error) error
- func (fdb *FileDB) Set(k, v []byte) error
- func (fdb *FileDB) Size() int64
- type Options
- type Stats
- type Strategy
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrItemExists = errors.New("item already exist") ErrItemFiltered = errors.New("item filtered") )
View Source
var ( BufferSize = 50 * 1024 * 1024 // 50Mb Separator = ";;;" NewLine = "\n" FpRatio = 0.0001 MaxItems = uint(250000) )
Functions ¶
This section is empty.
Types ¶
type FileDB ¶
FileDB - represents a file db implementation
type Options ¶
type Strategy ¶
type Strategy uint8
const ( None Strategy = iota // Uses go standard map without eviction - grows linearly with the items number MemoryMap // MemoryLRU keeps in memory the last x items and filter with a look-back probabilistic window with fixed size MemoryLRU // MemoryFilter uses bitset in-memory filters to remove duplicates MemoryFilter // Use full disk kv store to remove all duplicates - it should have low heap memory footprint but lots of I/O interactions DiskFilter )
Click to show internal directories.
Click to hide internal directories.