support LevelDB key/value database.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user