boltstore

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltStore

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

func NewBoltStore

func NewBoltStore(fileName string, opts *bbolt.Options) (*BoltStore, error)

NewBoltStore returns a new BoltStore. If nil options are provided a default is used.

func (*BoltStore) Close

func (b *BoltStore) Close() error

func (*BoltStore) Create

func (b *BoltStore) Create(ctx context.Context, set, key string, val []byte) error

func (*BoltStore) DB

func (b *BoltStore) DB() *bbolt.DB

DB will return the underlying bolt DB. This should not be modified once the server has started.

func (*BoltStore) Delete

func (b *BoltStore) Delete(ctx context.Context, set, key string) error

func (*BoltStore) Get

func (b *BoltStore) Get(ctx context.Context, set, key string) ([]byte, error)

func (*BoltStore) Set

func (b *BoltStore) Set(ctx context.Context, set, key string, val []byte) error

Jump to

Keyboard shortcuts

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