Example #1
0
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
}
Example #2
0
func List(c *gin.Context) {
	result, _ := json.Marshal(services.GetAllServices())
	c.String(200, string(result))
}