bitcask

package
v0.0.0-...-c4685af Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package bitcask Eric Brewer-inspired key/value store

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitcask

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

Bitcask Log-Structured Hash Table

func Open

func Open(path string) (*Bitcask, error)

Open a new or existing Bitcask datastore

func (*Bitcask) Close

func (db *Bitcask) Close()

Close the database

func (*Bitcask) Delete

func (db *Bitcask) Delete(key string) error

Delete key

func (*Bitcask) Get

func (db *Bitcask) Get(key string) (string, string, error)

Get returns a key value from the database

func (*Bitcask) HasKey

func (db *Bitcask) HasKey(key string) bool

HasKey return true if key exist.

func (*Bitcask) IsEmpty

func (db *Bitcask) IsEmpty() bool

IsEmpty returns true if db is empty.

func (*Bitcask) Keys

func (db *Bitcask) Keys() []string

Keys reterns a list with the existing keyes.

func (*Bitcask) Merge

func (db *Bitcask) Merge() error

Merge compacts the logs.

func (*Bitcask) Put

func (db *Bitcask) Put(key, value string) error

Put adds a key value to the database

func (*Bitcask) Size

func (db *Bitcask) Size() int

Size returns the number of keys.

func (*Bitcask) Sync

func (db *Bitcask) Sync()

Sync writes changes to disk

Jump to

Keyboard shortcuts

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