memdb

package
v0.0.0-...-1de2f69 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database is an in-memory, non-persistent database mainly for testing purposes.

func New

func New() *Database

New creates an empty in-memory database.

func (*Database) Close

func (s *Database) Close()

Close does nothing

func (*Database) Compact

func (s *Database) Compact()

Compact does nothing. In-memory databases are always compact.

func (*Database) Delete

func (s *Database) Delete(k db.Key)

Delete deletes a key.

func (Database) Get

func (s Database) Get(k db.Key) db.MaybeValue

Get looks up a key.

func (*Database) Put

func (s *Database) Put(k db.Key, v db.Value)

Put stores data in the database.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL