storage

package
v0.0.0-...-eba460c Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_STORAGE_ENGINE = "ldb"

Variables

This section is empty.

Functions

func RegisterStorageEngine

func RegisterStorageEngine(name string, fn func(path string) (Storage, error))

Types

type Storage

type Storage interface {
	Set(k, v []byte) error
	Get(k []byte) ([]byte, error)
	Delete(k []byte) error
	ForEach(fn func(k, v []byte) error) error
	Close() error
	WALName() string
}

func OpenLeveldbStorage

func OpenLeveldbStorage(path string) (Storage, error)

func OpenStorage

func OpenStorage(path string) (Storage, error)

Jump to

Keyboard shortcuts

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