bbolt

package
v0.0.0-...-f66ea8c Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterator

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

func (*Iterator) Close

func (it *Iterator) Close()

func (*Iterator) Key

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

func (*Iterator) Next

func (it *Iterator) Next()

func (*Iterator) Seek

func (it *Iterator) Seek(key []byte)

func (*Iterator) Valid

func (it *Iterator) Valid() bool

func (*Iterator) Value

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

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithNoSync

func WithNoSync() Option

type Store

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

func New

func New(path string, bucket []byte, opts ...Option) (*Store, error)

New creates a new Store instance. path is a directory path or a file where the database files will be stored.

func (*Store) Close

func (s *Store) Close() error

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, key []byte) error

func (*Store) Get

func (s *Store) Get(ctx context.Context, key []byte) ([]byte, error)

func (*Store) NewIterator

func (s *Store) NewIterator(opts ...kv.IteratorOption) (kv.Iterator, error)

func (*Store) NewTransaction

func (s *Store) NewTransaction() (kv.Transaction, error)

func (*Store) Put

func (s *Store) Put(ctx context.Context, key []byte, val []byte) error

func (*Store) WithBucket

func (s *Store) WithBucket(bucket []byte) (*Store, error)

type Transaction

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

func (*Transaction) Commit

func (txn *Transaction) Commit(ctx context.Context) error

func (*Transaction) Delete

func (txn *Transaction) Delete(ctx context.Context, key []byte) error

func (*Transaction) Get

func (txn *Transaction) Get(ctx context.Context, key []byte) ([]byte, error)

func (*Transaction) Put

func (txn *Transaction) Put(ctx context.Context, key []byte, val []byte) error

func (*Transaction) Rollback

func (txn *Transaction) Rollback() error

Jump to

Keyboard shortcuts

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