func main() { if beego.RunMode == "dev" { beego.DirectoryIndex = true beego.StaticDir["/swagger"] = "swagger" } toolbox.AddHealthCheck("database", &healthcheck.CitycontentCheck{}) toolbox.AddHealthCheck("citycontent", &healthcheck.DatabaseCheck{}) //collector.Run() beego.Run() }
func toolbox_init() { // toolbox healthcheck task beego.EnableAdmin = true beego.AdminHttpAddr = "localhost" beego.AdminHttpPort = 8088 toolbox.AddHealthCheck("database", &DatabaseCheck{}) go a() }