Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StorageType ¶
type StorageType int
const ( Bolt StorageType = iota Leveldb Default = Bolt )
TODO: support badger. types of storage
type Storager ¶
type Storager interface { List() ([][]byte, error) // list all values Get(key string) ([]byte, error) // get a value along with key Set(key string, value []byte) error // set a key, value pair Batch(keys []string, values [][]byte) error // batch set key, value pairs Delete(key string) error // delete a key, value pair DeleteAll() error // delete all key, value pairs CloneDatabase(newPath string) error // clone the database to the newPath Type() string // return the underlying type of db Close() error // close the db }
func NewStorager ¶
func NewStorager(st StorageType, dbPath string) (Storager, error)
Click to show internal directories.
Click to hide internal directories.