Upgrade docker sdk to moby (#491)
* Replace deprecated method * Upgrade docker sdk to moby
This commit is contained in:
committed by
GitHub
parent
94ec06a3fe
commit
3ee2975d76
@@ -6,7 +6,7 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
docker "docker.io/go-docker"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/play-with-docker/play-with-docker/config"
|
||||
"github.com/shirou/gopsutil/load"
|
||||
)
|
||||
@@ -15,7 +15,7 @@ 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()
|
||||
c, err := client.NewClientWithOpts()
|
||||
|
||||
if err != nil {
|
||||
rw.WriteHeader(http.StatusInternalServerError)
|
||||
|
||||
Reference in New Issue
Block a user