bolt

package
v0.0.0-...-d85aa1e Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// Path is a path to a directory where we will create files, one per user Map / user Log.
	Path string
	// contains filtered or unexported fields
}

Storage gives a service that persists to a BoltDB file.

func (*Storage) Close

func (bbs *Storage) Close()

Close calls the underlying Close method on the BoltDBs which releases file locks.

func (*Storage) ExecuteReadOnly

func (bbs *Storage) ExecuteReadOnly(ctx context.Context, namespace []byte, f func(ctx context.Context, db verifiable.KeyReader) error) error

ExecuteReadOnly executes a read only query

func (*Storage) ExecuteUpdate

func (bbs *Storage) ExecuteUpdate(ctx context.Context, namespace []byte, f func(ctx context.Context, db verifiable.KeyWriter) error) error

ExecuteUpdate executes an update query

Jump to

Keyboard shortcuts

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