Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinearHash ¶
type LinearHash struct {
// contains filtered or unexported fields
}
LinearHash implements on-disk hashing based indexing using Linear Hashing algorithm.
func Open ¶
func Open(indexFile string, opts *Options) (*LinearHash, error)
Open opens the file as linear-hash indexing file and returns the indexer instance. If 'opts' is nil, uses default options.
func (*LinearHash) Close ¶
func (idx *LinearHash) Close() error
Close flushes any pending writes and frees the file descriptor.
func (*LinearHash) Del ¶
func (idx *LinearHash) Del(key []byte) (uint64, error)
Del removes the entry for the given key from the hash table and returns the removed entry.
func (*LinearHash) Get ¶
func (idx *LinearHash) Get(key []byte) (uint64, error)
Get finds the index entry for given key in the hash table and returns. If not entry found, returns ErrKeyNotFound.
func (*LinearHash) Put ¶
func (idx *LinearHash) Put(key []byte, val uint64) error
Put inserts the indexing entry into the hash table.
func (*LinearHash) String ¶
func (idx *LinearHash) String() string
Click to show internal directories.
Click to hide internal directories.