func load(path string) *Config { if flag.DebugMode { config.Debug = log.New(os.Stderr, "debug: config: ", 0) } cfg := new(Config) config.Load(cfg, path, "tsp-poller?host={{.Hostname}}") if flag.TestMode { cfg.Dump(os.Stdout) os.Exit(0) } go func() { dummy := new(Config) config.Next(dummy) restartCause <- "config updated" }() return cfg }
func changeMonitor() { dummy := new(Config) xconfig.Next(dummy) reload <- "config updated" }