1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 08:19:40 +02:00

feat(cli): Add CLI flag for health-check (#1366)

This commit is contained in:
1138-4EB 2018-01-15 19:34:07 +01:00 committed by Anthony Lapenna
parent 340ec841fe
commit 6acfb580dc
7 changed files with 37 additions and 6 deletions

11
api/http/health_check.go Normal file
View file

@ -0,0 +1,11 @@
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
}