support LevelDB key/value database.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2016-09-19 16:19:20 +08:00
parent 2fba9b3d74
commit bf56f592e8
9 changed files with 238 additions and 16 deletions

View File

@@ -65,10 +65,11 @@ type SectionLog struct {
// SectionStat is sub seciont of config.
type SectionStat struct {
Engine string `yaml:"engine"`
Redis SectionRedis `yaml:"redis"`
BoltDB SectionBoltDB `yaml:"boltdb"`
BuntDB SectionBuntDB `yaml:"buntdb"`
Engine string `yaml:"engine"`
Redis SectionRedis `yaml:"redis"`
BoltDB SectionBoltDB `yaml:"boltdb"`
BuntDB SectionBuntDB `yaml:"buntdb"`
LevelDB SectionLevelDB `yaml:"leveldb"`
}
// SectionRedis is sub seciont of config.
@@ -89,6 +90,11 @@ type SectionBuntDB struct {
Path string `yaml:"path"`
}
// SectionLevelDB is sub seciont of config.
type SectionLevelDB struct {
Path string `yaml:"path"`
}
// SectionPID is sub seciont of config.
type SectionPID struct {
Enabled bool `yaml:"enabled"`
@@ -148,6 +154,7 @@ func BuildDefaultPushConf() ConfYaml {
conf.Stat.BoltDB.Bucket = "gorush"
conf.Stat.BuntDB.Path = "gorush.db"
conf.Stat.LevelDB.Path = "gorush.db"
return conf
}