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:
parent
340ec841fe
commit
6acfb580dc
7 changed files with 37 additions and 6 deletions
11
api/http/health_check.go
Normal file
11
api/http/health_check.go
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue