Bump cAdvisor (and dependencies) godeps version

This commit is contained in:
Tim St. Clair
2016-05-20 11:43:32 -07:00
parent 4215fe57a5
commit 237f90d6ee
388 changed files with 3788 additions and 121879 deletions

View File

@@ -20,6 +20,7 @@ import (
"sync"
"time"
"github.com/blang/semver"
rktapi "github.com/coreos/rkt/api/v1alpha"
"golang.org/x/net/context"
@@ -29,6 +30,7 @@ import (
const (
defaultRktAPIServiceAddr = "localhost:15441"
timeout = 2 * time.Second
minimumRktBinVersion = "1.6.0"
)
var (
@@ -55,7 +57,25 @@ func Client() (rktapi.PublicAPIClient, error) {
return
}
rktClient = rktapi.NewPublicAPIClient(apisvcConn)
apisvc := rktapi.NewPublicAPIClient(apisvcConn)
resp, err := apisvc.GetInfo(context.Background(), &rktapi.GetInfoRequest{})
if err != nil {
rktClientErr = fmt.Errorf("rkt: GetInfo() failed: %v", err)
return
}
binVersion, err := semver.Make(resp.Info.RktVersion)
if err != nil {
rktClientErr = fmt.Errorf("rkt: couldn't parse RtVersion: %v", err)
return
}
if binVersion.LT(semver.MustParse(minimumRktBinVersion)) {
rktClientErr = fmt.Errorf("rkt: binary version is too old(%v), requires at least %v", resp.Info.RktVersion, minimumRktBinVersion)
return
}
rktClient = apisvc
})
return rktClient, rktClientErr