sinkhole

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: GPL-3.0 Imports: 7 Imported by: 0 modules, 0 packages

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 NewSinkhole

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

NewSinkhole creates a dummy database.

Types

type Sinkhole

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

Sinkhole is a dummy storage.

func (*Sinkhole) Delete

func (s *Sinkhole) Delete(key string) error

Delete deletes a record from the database.

func (*Sinkhole) Exists

func (s *Sinkhole) Exists(key string) (bool, error)

Exists returns whether an entry with the given key exists.

func (*Sinkhole) Get

func (s *Sinkhole) Get(key string) (record.Record, error)

Get returns a database record.

func (*Sinkhole) Injected added in v0.3.0

func (s *Sinkhole) Injected() bool

Injected returns whether the database is injected.

func (*Sinkhole) Maintain

func (s *Sinkhole) Maintain(ctx context.Context) error

Maintain runs a light maintenance operation on the database.

func (*Sinkhole) MaintainRecordStates added in v0.5.2

func (s *Sinkhole) MaintainRecordStates(ctx context.Context, purgeDeletedBefore time.Time) error

MaintainRecordStates maintains records states in the database.

func (*Sinkhole) MaintainThorough

func (s *Sinkhole) MaintainThorough(ctx context.Context) error

MaintainThorough runs a thorough maintenance operation on the database.

func (*Sinkhole) Put

func (s *Sinkhole) Put(r record.Record) (record.Record, error)

Put stores a record in the database.

func (*Sinkhole) PutMany added in v0.5.0

func (s *Sinkhole) PutMany() (chan<- record.Record, <-chan error)

PutMany stores many records in the database.

func (*Sinkhole) Query

func (s *Sinkhole) Query(q *query.Query, local, internal bool) (*iterator.Iterator, error)

Query returns a an iterator for the supplied query.

func (*Sinkhole) ReadOnly

func (s *Sinkhole) ReadOnly() bool

ReadOnly returns whether the database is read only.

func (*Sinkhole) Shutdown

func (s *Sinkhole) 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