Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultDBFile is the default path of LevelDB database file DefaultDBFile = "./db/default.leveldb" // UserDBFile is the path of user database file UserDBFile = "./db/user.leveldb" // SessDBFile is the path of session database file SessDBFile = "./db/sess.leveldb" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LevelDB ¶
type LevelDB struct { DB *leveldb.DB LevelDBConfig *LevelDBConfig }
LevelDB is a simple wrapper for leveldb.DB
func NewLevelDB ¶
func NewLevelDB(config LevelDBConfig) (ldb *LevelDB, err error)
NewLevelDB opens LevelDB database file and init LevelDB instance
type LevelDBConfig ¶
type LevelDBConfig struct { DBFile string Options *opt.Options ReadOptions *opt.ReadOptions WriteOptions *opt.WriteOptions }
LevelDBConfig contains some options of leveldb
Click to show internal directories.
Click to hide internal directories.