forked from p53841790/wheat-cache
feat(conf): update conf
This commit is contained in:
parent
4a887b0e58
commit
4413ee6f92
|
@ -8,9 +8,6 @@ import (
|
|||
|
||||
const (
|
||||
linuxPath = "/etc/wheat-cache/"
|
||||
|
||||
devPath = "./conf"
|
||||
devPathBin = "../conf"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -19,7 +16,7 @@ func init() {
|
|||
switch err.(type) {
|
||||
case nil:
|
||||
case viper.ConfigFileNotFoundError:
|
||||
formatPath := []string{linuxPath, devPath, devPath}
|
||||
formatPath := []string{linuxPath}
|
||||
log.Fatalf("the profile could not be read, read path:%v", formatPath)
|
||||
default:
|
||||
log.Fatalf("the resolution of the profile failed, err: %v", err)
|
||||
|
@ -42,10 +39,6 @@ func LoadConf(path string) error {
|
|||
// linux
|
||||
viper.AddConfigPath(linuxPath)
|
||||
|
||||
// 开发环境
|
||||
viper.AddConfigPath(devPath)
|
||||
viper.AddConfigPath(devPathBin)
|
||||
|
||||
viper.SetConfigType("yaml")
|
||||
|
||||
err := viper.ReadInConfig()
|
||||
|
|
|
@ -30,19 +30,19 @@ plugins-control:
|
|||
|
||||
# log-context: Logs generated by storage or gateway are pushed through this message
|
||||
# log-context: storage 或者 gateway 产生的日志通过这个消息推送
|
||||
- log-context: [ "mock-plugins" ]
|
||||
log-context: [ "mock-plugins" ]
|
||||
|
||||
# lru-clean-context: Lru is pushed through this message when data cleansing occurs
|
||||
# lru-clean-context: Lru 发生数据清理时通过这个消息推送
|
||||
- lru-clean-context: ["mock-plugins"]
|
||||
lru-clean-context: ["mock-plugins"]
|
||||
|
||||
# lru-ttl-context: Lru is pushed through this message when data expires
|
||||
# lru-ttl-context: Lru 发生数据过期时通过这个消息推送
|
||||
- lru-ttl-context: ["mock-plugins"]
|
||||
lru-ttl-context: ["mock-plugins"]
|
||||
|
||||
# plugins-info-context:All plugins information for the current project
|
||||
# plugins-info-context: 当前项目全部的插件信息
|
||||
- plugins-info-context: ["mock-plugins"]
|
||||
plugins-infos-context: ["mock-plugins"]
|
||||
|
||||
gateway:
|
||||
host: '127.0.0.1'
|
||||
|
|
Loading…
Reference in New Issue