bbolt

package
v0.0.0-...-2627f95 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DriverName describes the name for this driver
	DriverName = "bbolt"
)

Variables

This section is empty.

Functions

func Plugins

func Plugins() []kv.Plugin

Plugins returns a list of kv plugins implemented by this package.

Types

type Iterator

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

Iterator implements kv.Iterator on top of a bbolt cursor

func (*Iterator) Error

func (iterator *Iterator) Error() error

Error implements Iterator.Error

func (*Iterator) Key

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

Key implements Iterator.Key

func (*Iterator) Next

func (iterator *Iterator) Next() bool

Next implements Iterator.Next

func (*Iterator) Value

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

Value implements Iterator.Value

type Partition

type Partition struct {
	kv.Snapshotter
	// contains filtered or unexported fields
}

Partition implements kv.Partition on top of a bbolt store bucket

func (*Partition) Begin

func (partition *Partition) Begin(writable bool) (kv.Transaction, error)

Begin implements Partition.Begin

func (*Partition) Create

func (partition *Partition) Create(metadata []byte) error

Create implements Partition.Create

func (*Partition) Delete

func (partition *Partition) Delete() error

Delete implements Partition.Delete

func (*Partition) Name

func (partition *Partition) Name() []byte

Name implements Partition.Name

type Plugin

type Plugin struct {
}

Plugin implements kv.Plugin for bbolt

func (*Plugin) Name

func (plugin *Plugin) Name() string

Name implements Plugin.Name

func (*Plugin) NewRootStore

func (plugin *Plugin) NewRootStore(options kv.PluginOptions) (kv.RootStore, error)

NewRootStore implements Plugin.NewRootStore

func (*Plugin) NewTempRootStore

func (plugin *Plugin) NewTempRootStore() (kv.RootStore, error)

NewTempRootStore implements Plugin.NewTempRootStore

type RootStore

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

RootStore implements kv.RootStore on top of a single bbolt store.

func NewRootStore

func NewRootStore(config RootStoreConfig) (*RootStore, error)

NewRootStore creates a new bbolt root store

func (*RootStore) Close

func (rootStore *RootStore) Close() error

Close implements RootStore.Close

func (*RootStore) Delete

func (rootStore *RootStore) Delete() error

Delete implements RootStore.Delete

func (*RootStore) Store

func (rootStore *RootStore) Store(name []byte) kv.Store

Store implements RootStore.Store

func (*RootStore) Stores

func (rootStore *RootStore) Stores() ([][]byte, error)

Stores implements RootStore.Stores

type RootStoreConfig

type RootStoreConfig struct {
	// Path is the path to the bbolt data directory
	Path string
}

RootStoreConfig contains configuration options for a bbolt root store

type Store

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

Store implements kv.Store on top of a bbolt store bucket

func (*Store) Create

func (store *Store) Create() error

Create implements Store.Create

func (*Store) Delete

func (store *Store) Delete() error

Delete implements Store.Delete

func (*Store) Name

func (store *Store) Name() []byte

Name implements Store.Name

func (*Store) Partition

func (store *Store) Partition(name []byte) kv.Partition

Partition implements Store.Partition

func (*Store) Partitions

func (store *Store) Partitions(names keys.Range, limit int) ([][]byte, error)

Partitions implements Store.Partitions

type Transaction

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

Transaction implements kv.Transaction on top of a bbolt transaction.

func (*Transaction) Commit

func (transaction *Transaction) Commit() error

Commit implements Transaction.Commit

func (*Transaction) Delete

func (transaction *Transaction) Delete(key []byte) error

Delete implements Transaction.Delete

func (*Transaction) Get

func (transaction *Transaction) Get(key []byte) ([]byte, error)

Get implements Transaction.Get

func (*Transaction) Keys

func (transaction *Transaction) Keys(keys keys.Range, order kv.SortOrder) (kv.Iterator, error)

Keys implements Transaction.Keys

func (*Transaction) Metadata

func (transaction *Transaction) Metadata() ([]byte, error)

Metadata implements Transaction.Metadata

func (*Transaction) Put

func (transaction *Transaction) Put(key, value []byte) error

Put implements Transaction.Put

func (*Transaction) Rollback

func (transaction *Transaction) Rollback() error

Rollback implements Transaction.Rollback

func (*Transaction) SetMetadata

func (transaction *Transaction) SetMetadata(metadata []byte) error

SetMetadata implements Transaction.SetMetadata

Jump to

Keyboard shortcuts

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