bbolt

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBBolt

func NewBBolt(name, location string) (storage.Interface, error)

NewBBolt opens/creates a bbolt database.

Types

type BBolt

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

BBolt database made pluggable for portbase.

func (*BBolt) Delete

func (b *BBolt) Delete(key string) error

Delete deletes a record from the database.

func (*BBolt) Get

func (b *BBolt) Get(key string) (record.Record, error)

Get returns a database record.

func (*BBolt) Injected

func (b *BBolt) Injected() bool

Injected returns whether the database is injected.

func (*BBolt) Maintain

func (b *BBolt) Maintain(_ context.Context) error

Maintain runs a light maintenance operation on the database.

func (*BBolt) MaintainRecordStates added in v0.5.2

func (b *BBolt) MaintainRecordStates(ctx context.Context, purgeDeletedBefore time.Time) error

MaintainRecordStates maintains records states in the database.

func (*BBolt) MaintainThorough

func (b *BBolt) MaintainThorough(_ context.Context) error

MaintainThorough runs a thorough maintenance operation on the database.

func (*BBolt) Put

func (b *BBolt) Put(r record.Record) (record.Record, error)

Put stores a record in the database.

func (*BBolt) PutMany added in v0.5.0

func (b *BBolt) PutMany() (chan<- record.Record, <-chan error)

PutMany stores many records in the database.

func (*BBolt) Query

func (b *BBolt) Query(q *query.Query, local, internal bool) (*iterator.Iterator, error)

Query returns a an iterator for the supplied query.

func (*BBolt) ReadOnly

func (b *BBolt) ReadOnly() bool

ReadOnly returns whether the database is read only.

func (*BBolt) Shutdown

func (b *BBolt) Shutdown() error

Shutdown shuts down the database.

Jump to

Keyboard shortcuts

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