boltdb

package
v0.0.0-...-1006bf5 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package boltdb implements a store.KVStore on top of BoltDB. It supports the following options:

"bucket" (string): the name of BoltDB bucket to use, defaults to "bleve".

"nosync" (bool): if true, set boltdb.DB.NoSync to true. It speeds up index operations in exchange of losing integrity guarantees if indexation aborts without closing the index. Use it when rebuilding indexes from zero.

Index

Constants

View Source
const Name = "boltdb"

Variables

This section is empty.

Functions

func New

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

Types

type Iterator

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

func (*Iterator) Close

func (i *Iterator) Close() error

func (*Iterator) Current

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

func (*Iterator) Key

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

func (*Iterator) Next

func (i *Iterator) Next()

func (*Iterator) Seek

func (i *Iterator) Seek(k []byte)

func (*Iterator) Valid

func (i *Iterator) Valid() bool

func (*Iterator) Value

func (i *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 (bs *Store) Close() error

func (*Store) Reader

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

func (*Store) Stats

func (bs *Store) Stats() json.Marshaler

func (*Store) Writer

func (bs *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(batch 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