hashmap

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: GPL-3.0 Imports: 9 Imported by: 1

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) MaintainRecordStates added in v0.5.2

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

MaintainRecordStates maintains records states in 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(shadowDelete bool) (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