Add error to GetSession return values

- Add button to copy instance SSH access
This commit is contained in:
marcos
2017-12-14 17:37:38 -03:00
parent 3ffaaaf934
commit dd6a332889
17 changed files with 94 additions and 26 deletions

View File

@@ -12,6 +12,7 @@ import (
)
func Ping(rw http.ResponseWriter, req *http.Request) {
defer latencyHistogramVec.WithLabelValues("ping").Observe(float64(time.Since(time.Now()).Nanoseconds()) / 1000000)
// Get system load average of the last 5 minutes and compare it against a threashold.
c, err := docker.NewEnvClient()
@@ -27,6 +28,7 @@ func Ping(rw http.ResponseWriter, req *http.Request) {
if _, err := c.Info(ctx); err != nil && err == context.DeadlineExceeded {
log.Printf("Docker info took to long to respond\n")
rw.WriteHeader(http.StatusGatewayTimeout)
return
}
a, err := load.Avg()