bolt

package
v0.0.0-...-a30bd34 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrUnableToOpen = "Unable to open boltdb; is there a eventlet already running?  %v"
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, opts ...Option) (*client, error)

Types

type Bucket

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

func (*Bucket) Delete

func (b *Bucket) Delete(key []byte) error

func (*Bucket) ForEach

func (b *Bucket) ForEach(fn func(k, v []byte) error) error

func (*Bucket) Get

func (b *Bucket) Get(key []byte) ([]byte, error)

func (*Bucket) NextSequence

func (b *Bucket) NextSequence() (uint64, error)

func (*Bucket) Put

func (b *Bucket) Put(key []byte, value []byte) error

type Option

type Option func(c *client) error

func WithLogger

func WithLogger(logger eventlet.Logger) Option

func WithPath

func WithPath(path string) Option

type Tx

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

func (*Tx) Bucket

func (t *Tx) Bucket(b []byte) kv.Bucket

func (*Tx) CreateBucketIfNotExists

func (t *Tx) CreateBucketIfNotExists(b []byte) (kv.Bucket, error)

Jump to

Keyboard shortcuts

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