func GetCritical() []interface{} { //TODO: find different name for this func var s []interface{} for item := range services.GetAllServices().IterBuffered() { service := item.Val if service.Health > health.OK { s = append(s, service) } } return s }
func List(c *gin.Context) { result, _ := json.Marshal(services.GetAllServices()) c.String(200, string(result)) }