bbolt

package
v0.18.8 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: GPL-3.0 Imports: 11 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) GetMeta added in v0.10.0

func (b *BBolt) GetMeta(key string) (*record.Meta, error)

GetMeta returns the metadata of a database record.

func (*BBolt) Injected

func (b *BBolt) Injected() bool

Injected returns whether the database is injected.

func (*BBolt) MaintainRecordStates added in v0.5.2

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

MaintainRecordStates maintains records states in the database.

func (*BBolt) Purge added in v0.8.3

func (b *BBolt) Purge(ctx context.Context, q *query.Query, local, internal, shadowDelete bool) (int, error)

Purge deletes all records that match the given query. It returns the number of successful deletes and an error.

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(shadowDelete bool) (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