goleveldb

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "goleveldb"
)

Variables

This section is empty.

Functions

func New

func New(mo store.MergeOperator, config map[string]interface{}) (store.KVStore, error)

Types

type Batch

type Batch struct {
	// contains filtered or unexported fields
}

func (*Batch) Close

func (b *Batch) Close() error

func (*Batch) Delete

func (b *Batch) Delete(key []byte)

func (*Batch) Merge

func (b *Batch) Merge(key, val []byte)

func (*Batch) Reset

func (b *Batch) Reset()

func (*Batch) Set

func (b *Batch) Set(key, val []byte)

type Iterator

type Iterator struct {
	// contains filtered or unexported fields
}

func (*Iterator) Close

func (ldi *Iterator) Close() error

func (*Iterator) Current

func (ldi *Iterator) Current() ([]byte, []byte, bool)

func (*Iterator) Key

func (ldi *Iterator) Key() []byte

func (*Iterator) Next

func (ldi *Iterator) Next()

func (*Iterator) Seek

func (ldi *Iterator) Seek(key []byte)

func (*Iterator) Valid

func (ldi *Iterator) Valid() bool

func (*Iterator) Value

func (ldi *Iterator) Value() []byte

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) Get

func (r *Reader) Get(key []byte) ([]byte, error)

func (*Reader) MultiGet

func (r *Reader) MultiGet(keys [][]byte) ([][]byte, error)

func (*Reader) PrefixIterator

func (r *Reader) PrefixIterator(prefix []byte) store.KVIterator

func (*Reader) RangeIterator

func (r *Reader) RangeIterator(start, end []byte) store.KVIterator

type Store

type Store struct {
	// contains filtered or unexported fields
}

func (*Store) Close

func (ldbs *Store) Close() error

func (*Store) Compact

func (ldbs *Store) Compact() error

Compact compacts the underlying goleveldb store. The current implementation includes a workaround for github issue #374 (see CompactWithBatchSize).

func (*Store) CompactWithBatchSize

func (ldbs *Store) CompactWithBatchSize(batchSize int) error

CompactWithBatchSize removes DictionaryTerm entries with a count of zero (in batchSize batches), then compacts the underlying goleveldb store. Removing entries is a workaround for github issue #374.

func (*Store) Reader

func (ldbs *Store) Reader() (store.KVReader, error)

func (*Store) Writer

func (ldbs *Store) Writer() (store.KVWriter, error)

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) ExecuteBatch

func (w *Writer) ExecuteBatch(b store.KVBatch) error

func (*Writer) NewBatch

func (w *Writer) NewBatch() store.KVBatch

func (*Writer) NewBatchEx

func (w *Writer) NewBatchEx(options store.KVBatchOptions) ([]byte, store.KVBatch, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL