portainer/api/http/health_check.go

12 lines
203 B
Go

package http
import (
"net/http"
)
// HealthCheck GETs /api/status
func HealthCheck(addr string) (int, error) {
resp, err := http.Get("http://" + addr + "/api/status")
return resp.StatusCode, err
}