bolt

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store implements a store backed by Bolt.

func Open

func Open(path string) (*Store, error)

Open a bolt store.

func (*Store) Close

func (s *Store) Close() error

Close frees all resources (e.g. file handles, network sockets) used by the store.

func (*Store) Create

func (s *Store) Create(key, value []byte) error

Create a (key, value) in the store.

func (*Store) Delete

func (s *Store) Delete(key []byte) error

Delete a key (with its respective value) from the store.

func (*Store) Range

func (s *Store) Range(prefix []byte, f func(key, value []byte) error) error

Range calls f sequentially for each (key, value) where key starts with the given prefix.

func (*Store) Update

func (s *Store) Update(key []byte, mutator func([]byte) ([]byte, error)) error

Update a (key, value) in the store.

Jump to

Keyboard shortcuts

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