mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-11-04 16:40:21 +00:00
⚡️ pprof 性能调优 / 计划任务支持秒级
This commit is contained in:
1 parent
3cfbcaa22c
commit
7e5a91160a
22 files changed
+149
-105
No files matched your search
@@ -1,13 +1,11 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"github.com/spf13/viper"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
@@ -68,13 +66,6 @@ func (c *Config) Read(path string) error {
|
||||
}
|
||||
|
||||
c.updateIgnoredIPNotificationID()
|
||||
|
||||
c.v.OnConfigChange(func(in fsnotify.Event) {
|
||||
c.v.Unmarshal(c)
|
||||
fmt.Println("配置文件更新,重载配置", c)
|
||||
})
|
||||
|
||||
go c.v.WatchConfig()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user