nacos config

This commit is contained in:
eson
2023-09-19 17:34:10 +08:00
parent 7fd65d9ac7
commit 4f37274438
75 changed files with 82 additions and 1141 deletions

View File

@@ -17,9 +17,8 @@ var configFile = flag.String("f", "etc/{{.serviceName}}.yaml", "the config file"
func main() {
flag.Parse()
cfgContent := fsconfig.StartNacosConfig(configFile,nil)
var c config.Config
conf.LoadConfigFromYamlBytes([]byte(cfgContent),&c)
fsconfig.StartNacosConfig(*configFile, &c, nil)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {