hashmap

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: 9 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 NewHashMap

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

NewHashMap creates a hashmap database.

Types

type HashMap

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

HashMap storage.

func (*HashMap) Delete

func (hm *HashMap) Delete(key string) error

Delete deletes a record from the database.

func (*HashMap) Get

func (hm *HashMap) Get(key string) (record.Record, error)

Get returns a database record.

func (*HashMap) Injected

func (hm *HashMap) Injected() bool

Injected returns whether the database is injected.

func (*HashMap) Maintain

func (hm *HashMap) Maintain(_ context.Context) error

Maintain runs a light maintenance operation on the database.

func (*HashMap) MaintainRecordStates added in v0.5.2

func (hm *HashMap) MaintainRecordStates(ctx context.Context, purgeDeletedBefore time.Time) error

MaintainRecordStates maintains records states in the database.

func (*HashMap) MaintainThorough

func (hm *HashMap) MaintainThorough(_ context.Context) error

MaintainThorough runs a thorough maintenance operation on the database.

func (*HashMap) Put

func (hm *HashMap) Put(r record.Record) (record.Record, error)

Put stores a record in the database.

func (*HashMap) PutMany added in v0.5.0

func (hm *HashMap) PutMany() (chan<- record.Record, <-chan error)

PutMany stores many records in the database.

func (*HashMap) Query

func (hm *HashMap) Query(q *query.Query, local, internal bool) (*iterator.Iterator, error)

Query returns a an iterator for the supplied query.

func (*HashMap) ReadOnly

func (hm *HashMap) ReadOnly() bool

ReadOnly returns whether the database is read only.

func (*HashMap) Shutdown

func (hm *HashMap) 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