Update godeps
This commit is contained in:
parent
8b25cc67a5
commit
a736fba0e1
769 changed files with 15495 additions and 7996 deletions
6
vendor/k8s.io/kubernetes/pkg/client/restclient/client.go
generated
vendored
6
vendor/k8s.io/kubernetes/pkg/client/restclient/client.go
generated
vendored
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2014 The Kubernetes Authors All rights reserved.
|
||||
Copyright 2014 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
@ -222,7 +222,3 @@ func (c *RESTClient) Delete() *Request {
|
|||
func (c *RESTClient) APIVersion() unversioned.GroupVersion {
|
||||
return *c.contentConfig.GroupVersion
|
||||
}
|
||||
|
||||
func (c *RESTClient) Codec() runtime.Codec {
|
||||
return c.contentConfig.Codec
|
||||
}
|
||||
|
|
|
|||
38
vendor/k8s.io/kubernetes/pkg/client/restclient/config.go
generated
vendored
38
vendor/k8s.io/kubernetes/pkg/client/restclient/config.go
generated
vendored
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||
Copyright 2016 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
@ -37,6 +37,11 @@ import (
|
|||
"k8s.io/kubernetes/pkg/version"
|
||||
)
|
||||
|
||||
const (
|
||||
DefaultQPS float32 = 5.0
|
||||
DefaultBurst int = 10
|
||||
)
|
||||
|
||||
// Config holds the common attributes that can be passed to a Kubernetes client on
|
||||
// initialization.
|
||||
type Config struct {
|
||||
|
|
@ -93,10 +98,12 @@ type Config struct {
|
|||
// on top of the returned RoundTripper.
|
||||
WrapTransport func(rt http.RoundTripper) http.RoundTripper
|
||||
|
||||
// QPS indicates the maximum QPS to the master from this client. If zero, QPS is unlimited.
|
||||
// QPS indicates the maximum QPS to the master from this client.
|
||||
// If it's zero, the created RESTClient will use DefaultQPS: 5
|
||||
QPS float32
|
||||
|
||||
// Maximum burst for throttle
|
||||
// Maximum burst for throttle.
|
||||
// If it's zero, the created RESTClient will use DefaultBurst: 10.
|
||||
Burst int
|
||||
|
||||
// Rate limiter for limiting connections to the master from this client. If present overwrites QPS/Burst
|
||||
|
|
@ -136,15 +143,6 @@ type ContentConfig struct {
|
|||
// NegotiatedSerializer is used for obtaining encoders and decoders for multiple
|
||||
// supported media types.
|
||||
NegotiatedSerializer runtime.NegotiatedSerializer
|
||||
|
||||
// Codec specifies the encoding and decoding behavior for runtime.Objects passed
|
||||
// to a RESTClient or Client. Required when initializing a RESTClient, optional
|
||||
// when initializing a Client.
|
||||
//
|
||||
// DEPRECATED: Please use NegotiatedSerializer instead.
|
||||
// Codec is currently used only in some tests and will be removed soon.
|
||||
// All production setups should use NegotiatedSerializer.
|
||||
Codec runtime.Codec
|
||||
}
|
||||
|
||||
// RESTClientFor returns a RESTClient that satisfies the requested attributes on a client Config
|
||||
|
|
@ -158,6 +156,14 @@ func RESTClientFor(config *Config) (*RESTClient, error) {
|
|||
if config.NegotiatedSerializer == nil {
|
||||
return nil, fmt.Errorf("NegotiatedSerializer is required when initializing a RESTClient")
|
||||
}
|
||||
qps := config.QPS
|
||||
if config.QPS == 0.0 {
|
||||
qps = DefaultQPS
|
||||
}
|
||||
burst := config.Burst
|
||||
if config.Burst == 0 {
|
||||
burst = DefaultBurst
|
||||
}
|
||||
|
||||
baseURL, versionedAPIPath, err := defaultServerUrlFor(config)
|
||||
if err != nil {
|
||||
|
|
@ -174,7 +180,7 @@ func RESTClientFor(config *Config) (*RESTClient, error) {
|
|||
httpClient = &http.Client{Transport: transport}
|
||||
}
|
||||
|
||||
return NewRESTClient(baseURL, versionedAPIPath, config.ContentConfig, config.QPS, config.Burst, config.RateLimiter, httpClient)
|
||||
return NewRESTClient(baseURL, versionedAPIPath, config.ContentConfig, qps, burst, config.RateLimiter, httpClient)
|
||||
}
|
||||
|
||||
// UnversionedRESTClientFor is the same as RESTClientFor, except that it allows
|
||||
|
|
@ -214,12 +220,6 @@ func SetKubernetesDefaults(config *Config) error {
|
|||
if len(config.UserAgent) == 0 {
|
||||
config.UserAgent = DefaultKubernetesUserAgent()
|
||||
}
|
||||
if config.QPS == 0.0 {
|
||||
config.QPS = 5.0
|
||||
}
|
||||
if config.Burst == 0 {
|
||||
config.Burst = 10
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
2
vendor/k8s.io/kubernetes/pkg/client/restclient/plugin.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/client/restclient/plugin.go
generated
vendored
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||
Copyright 2016 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
|||
4
vendor/k8s.io/kubernetes/pkg/client/restclient/request.go
generated
vendored
4
vendor/k8s.io/kubernetes/pkg/client/restclient/request.go
generated
vendored
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2014 The Kubernetes Authors All rights reserved.
|
||||
Copyright 2014 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
@ -573,7 +573,7 @@ func (r *Request) URL() *url.URL {
|
|||
if len(r.resource) != 0 {
|
||||
p = path.Join(p, strings.ToLower(r.resource))
|
||||
}
|
||||
// Join trims trailing slashes, so preserve r.pathPrefix's trailing slash for backwards compat if nothing was changed
|
||||
// Join trims trailing slashes, so preserve r.pathPrefix's trailing slash for backwards compatibility if nothing was changed
|
||||
if len(r.resourceName) != 0 || len(r.subpath) != 0 || len(r.subresource) != 0 {
|
||||
p = path.Join(p, r.resourceName, r.subresource, r.subpath)
|
||||
}
|
||||
|
|
|
|||
2
vendor/k8s.io/kubernetes/pkg/client/restclient/transport.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/client/restclient/transport.go
generated
vendored
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2014 The Kubernetes Authors All rights reserved.
|
||||
Copyright 2014 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
|||
4
vendor/k8s.io/kubernetes/pkg/client/restclient/url_utils.go
generated
vendored
4
vendor/k8s.io/kubernetes/pkg/client/restclient/url_utils.go
generated
vendored
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||
Copyright 2016 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
@ -36,7 +36,7 @@ func DefaultServerURL(host, apiPath string, groupVersion unversioned.GroupVersio
|
|||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
if hostURL.Scheme == "" {
|
||||
if hostURL.Scheme == "" || hostURL.Host == "" {
|
||||
scheme := "http://"
|
||||
if defaultTLS {
|
||||
scheme = "https://"
|
||||
|
|
|
|||
2
vendor/k8s.io/kubernetes/pkg/client/restclient/urlbackoff.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/client/restclient/urlbackoff.go
generated
vendored
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2015 The Kubernetes Authors All rights reserved.
|
||||
Copyright 2015 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
|||
2
vendor/k8s.io/kubernetes/pkg/client/restclient/versions.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/client/restclient/versions.go
generated
vendored
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2014 The Kubernetes Authors All rights reserved.
|
||||
Copyright 2014 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue