StatusApp/main.go

19 lines
348 B
Go

package main
2020-04-23 07:42:16 +07:00
import (
"status/server"
)
func main() {
cfg, err := ReadConfig("config.json")
if err != nil {
panic(err)
}
2020-04-23 07:42:16 +07:00
go checkLoop(cfg.Targets)
validServices := make([]string, 0, len(cfg.Targets))
for _, v := range cfg.Targets {
validServices = append(validServices, v.ServiceName)
}
server.StartServer(cfg.Port, validServices)
}