Update go dependencies (#4524)
This commit is contained in:
parent
2ba1a9e71a
commit
341d64b652
412 changed files with 43034 additions and 34165 deletions
5
vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go
generated
vendored
5
vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go
generated
vendored
|
|
@ -134,9 +134,14 @@ func (c *Clientset) Discovery() $.DiscoveryInterface|raw$ {
|
|||
|
||||
var newClientsetForConfigTemplate = `
|
||||
// NewForConfig creates a new Clientset for the given config.
|
||||
// If config's RateLimiter is not set and QPS and Burst are acceptable,
|
||||
// NewForConfig will generate a rate-limiter in configShallowCopy.
|
||||
func NewForConfig(c *$.Config|raw$) (*Clientset, error) {
|
||||
configShallowCopy := *c
|
||||
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
|
||||
if configShallowCopy.Burst <= 0 {
|
||||
return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0")
|
||||
}
|
||||
configShallowCopy.RateLimiter = $.flowcontrolNewTokenBucketRateLimiter|raw$(configShallowCopy.QPS, configShallowCopy.Burst)
|
||||
}
|
||||
var cs Clientset
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue