sinkhole

package
v1.6.28 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: GPL-3.0 Imports: 7 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) GetMeta

func (s *Sinkhole) GetMeta(key string) (*record.Meta, error)

GetMeta returns the metadata of a database record.

func (*Sinkhole) Injected

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

func (s *Sinkhole) MaintainRecordStates(ctx context.Context, purgeDeletedBefore time.Time, shadowDelete bool) 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

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