Correct respondd naming
This commit is contained in:
parent
a575c7132d
commit
c759c2a051
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
responedd:
|
respondd:
|
||||||
enable: true
|
enable: true
|
||||||
collectinterval: 15
|
collectinterval: 15
|
||||||
webserver:
|
webserver:
|
||||||
|
4
main.go
4
main.go
@ -31,7 +31,7 @@ func main() {
|
|||||||
flag.Parse()
|
flag.Parse()
|
||||||
config = models.ConfigReadFile(configFile)
|
config = models.ConfigReadFile(configFile)
|
||||||
|
|
||||||
collectInterval := time.Second * time.Duration(config.Responedd.CollectInterval)
|
collectInterval := time.Second * time.Duration(config.Respondd.CollectInterval)
|
||||||
|
|
||||||
if config.Nodes.Enable {
|
if config.Nodes.Enable {
|
||||||
go nodes.Saver(config)
|
go nodes.Saver(config)
|
||||||
@ -49,7 +49,7 @@ func main() {
|
|||||||
http.Handle("/", http.FileServer(http.Dir(config.Webserver.Webroot)))
|
http.Handle("/", http.FileServer(http.Dir(config.Webserver.Webroot)))
|
||||||
}
|
}
|
||||||
|
|
||||||
if config.Responedd.Enable {
|
if config.Respondd.Enable {
|
||||||
respondDaemon = respond.NewDaemon(func(coll *respond.Collector, res *respond.Response) {
|
respondDaemon = respond.NewDaemon(func(coll *respond.Collector, res *respond.Response) {
|
||||||
|
|
||||||
switch coll.CollectType {
|
switch coll.CollectType {
|
||||||
|
@ -9,12 +9,12 @@ import (
|
|||||||
|
|
||||||
//Config the config File of this daemon
|
//Config the config File of this daemon
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Responedd struct {
|
Respondd struct {
|
||||||
Enable bool `yaml:"enable"`
|
Enable bool `yaml:"enable"`
|
||||||
Port string `yaml:"port"`
|
Port string `yaml:"port"`
|
||||||
Address string `yaml:"address"`
|
Address string `yaml:"address"`
|
||||||
CollectInterval int `yaml:"collectinterval"`
|
CollectInterval int `yaml:"collectinterval"`
|
||||||
} `yaml:"responedd"`
|
} `yaml:"respondd"`
|
||||||
Webserver struct {
|
Webserver struct {
|
||||||
Enable bool `yaml:"enable"`
|
Enable bool `yaml:"enable"`
|
||||||
Port string `yaml:"port"`
|
Port string `yaml:"port"`
|
||||||
|
Loading…
Reference in New Issue
Block a user