leveldb

package
v0.0.0-...-377d1e4 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2015 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package leveldb provides an ordered key/value store.

BUG: This package is incomplete.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

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

Batch is a sequence of Sets and/or Deletes that are applied atomically.

func (*Batch) Delete

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

Delete adds an action to the batch that deletes the entry for key.

func (*Batch) Set

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

Set adds an action to the batch that sets the key to map to the value.

type DB

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

TODO: document DB.

func Open

func Open(dirname string, opts *db.Options) (*DB, error)

Open opens a LevelDB whose files live in the given directory.

func (*DB) Apply

func (d *DB) Apply(batch Batch, opts *db.WriteOptions) error

func (*DB) Close

func (d *DB) Close() error

func (*DB) Delete

func (d *DB) Delete(key []byte, opts *db.WriteOptions) error

func (*DB) Find

func (d *DB) Find(key []byte, opts *db.ReadOptions) db.Iterator

func (*DB) Get

func (d *DB) Get(key []byte, opts *db.ReadOptions) ([]byte, error)

func (*DB) Set

func (d *DB) Set(key, value []byte, opts *db.WriteOptions) error

Directories

Path Synopsis
Package bloom implements Bloom filters.
Package bloom implements Bloom filters.
Package crc implements the checksum algorithm used throughout leveldb.
Package crc implements the checksum algorithm used throughout leveldb.
Package db defines the interfaces for a key/value store.
Package db defines the interfaces for a key/value store.
Package memdb provides a memory-backed implementation of the db.DB interface.
Package memdb provides a memory-backed implementation of the db.DB interface.
Package memfs provides a memory-backed db.FileSystem implementation.
Package memfs provides a memory-backed db.FileSystem implementation.
Package record reads and writes sequences of records.
Package record reads and writes sequences of records.
Package table implements readers and writers of leveldb tables.
Package table implements readers and writers of leveldb tables.

Jump to

Keyboard shortcuts

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