sinkhole

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

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) Maintain

func (s *Sinkhole) Maintain() error

Maintain runs a light maintenance operation on the database.

func (*Sinkhole) MaintainThorough

func (s *Sinkhole) MaintainThorough() (err error)

MaintainThorough runs a thorough maintenance operation on the database.

func (*Sinkhole) Put

func (s *Sinkhole) Put(m record.Record) error

Put stores a record in the database.

func (*Sinkhole) Query

func (s *Sinkhole) Query(q *query.Query) (*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