leveldb

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const BootstrappedLevelDB = "BootstrappedLevelDB"

BootstrappedLevelDB key for bootstrap leveldb

Variables

This section is empty.

Functions

func GetRandomTestStoragePath

func GetRandomTestStoragePath() string

GetRandomTestStoragePath generates a random path for DB storage

func NewLevelDBRepository

func NewLevelDBRepository(db *leveldb.DB) storage.Repository

NewLevelDBRepository returns levelDb implementation of Repository

func NewLevelDBStorage

func NewLevelDBStorage(path string) (*leveldb.DB, error)

NewLevelDBStorage is a singleton implementation returning the default database as configured.

Types

type Bootstrapper

type Bootstrapper struct{}

Bootstrapper implements bootstrapper.Bootstrapper.

func (*Bootstrapper) Bootstrap

func (*Bootstrapper) Bootstrap(context map[string]interface{}) error

Bootstrap initialises the levelDB.

type Config

type Config interface {
	GetStoragePath() string
	GetConfigStoragePath() string
	SetDefault(key string, value interface{})
}

Config holds configuration data for storage package

Jump to

Keyboard shortcuts

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