boltdb

package
v0.0.0-...-dab54ce Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2017 License: LGPL-3.0 Imports: 4 Imported by: 1

Documentation

Overview

Package boltdb provides the (default) BoldDB database driver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S

type S struct {
	sync.Mutex
	// contains filtered or unexported fields
}

S is the driver for the BoltDB store engine.

func New

func New(path string) (s *S, err error)

New generates a new BoltDB store from the storage path.

func (*S) Close

func (s *S) Close() error

Close should be used after using the RocksDB store.

func (*S) Get

func (s *S) Get(key string) (value []byte, v *version.V, err error)

Get returns the value and the version stored currently for the specified key.

func (*S) List

func (s *S) List() (map[string]*version.V, error)

List returns the map of keys with their values.

func (*S) Set

func (s *S) Set(key string, value []byte, v *version.V) error

Set sets the value and the version that must be stored for the specified key.

func (*S) SetBatch

func (s *S) SetBatch(keys []string, values [][]byte, versions []*version.V) error

SetBatch executes the given "Set" operations in a atomic way.

Jump to

Keyboard shortcuts

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