bolt

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Type = "bolt"
)

Variables

This section is empty.

Functions

func Create

func Create(path string, _ graph.Options) (kv.BucketKV, error)

func Open

func Open(path string, opt graph.Options) (kv.BucketKV, error)

Types

type Bucket

type Bucket struct {
	Bucket *bolt.Bucket
	// contains filtered or unexported fields
}

func (*Bucket) Del

func (b *Bucket) Del(k []byte) error

func (*Bucket) Get

func (b *Bucket) Get(ctx context.Context, keys [][]byte) ([][]byte, error)

func (*Bucket) Put

func (b *Bucket) Put(k, v []byte) error

func (*Bucket) Scan

func (b *Bucket) Scan(pref []byte) kv.KVIterator

func (*Bucket) SetFillPercent

func (b *Bucket) SetFillPercent(v float64)

type DB

type DB struct {
	DB *bolt.DB
}

func (*DB) Close

func (db *DB) Close() error

func (*DB) Tx

func (db *DB) Tx(update bool) (kv.BucketTx, error)

func (*DB) Type

func (db *DB) Type() string

type Iterator

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

func (*Iterator) Close

func (it *Iterator) Close() error

func (*Iterator) Err

func (it *Iterator) Err() error

func (*Iterator) Key

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

func (*Iterator) Next

func (it *Iterator) Next(ctx context.Context) bool

func (*Iterator) Val

func (it *Iterator) Val() []byte

type Tx

type Tx struct {
	Tx *bolt.Tx
	// contains filtered or unexported fields
}

func (*Tx) Bucket

func (tx *Tx) Bucket(name []byte) kv.Bucket

func (*Tx) Commit

func (tx *Tx) Commit(ctx context.Context) error

func (*Tx) Get

func (tx *Tx) Get(ctx context.Context, keys []kv.BucketKey) ([][]byte, error)

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Jump to

Keyboard shortcuts

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