mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 04:52:08 +00:00
generate client for scale, which has only the expansion interface
This commit is contained in:
parent
00b18446ac
commit
b8be5e1340
@ -49,6 +49,8 @@ type ScaleStatus struct {
|
||||
Selector map[string]string `json:"selector,omitempty"`
|
||||
}
|
||||
|
||||
// +genclient=true,noMethods=true
|
||||
|
||||
// represents a scaling request for a resource.
|
||||
type Scale struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
|
@ -28,6 +28,7 @@ type ExtensionsInterface interface {
|
||||
HorizontalPodAutoscalersGetter
|
||||
IngressesGetter
|
||||
JobsGetter
|
||||
ScalesGetter
|
||||
ThirdPartyResourcesGetter
|
||||
}
|
||||
|
||||
@ -56,6 +57,10 @@ func (c *ExtensionsClient) Jobs(namespace string) JobInterface {
|
||||
return newJobs(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ExtensionsClient) Scales(namespace string) ScaleInterface {
|
||||
return newScales(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ExtensionsClient) ThirdPartyResources(namespace string) ThirdPartyResourceInterface {
|
||||
return newThirdPartyResources(c, namespace)
|
||||
}
|
||||
|
@ -26,4 +26,6 @@ type IngressExpansion interface{}
|
||||
|
||||
type JobExpansion interface{}
|
||||
|
||||
type ScaleExpansion interface{}
|
||||
|
||||
type ThirdPartyResourceExpansion interface{}
|
||||
|
42
pkg/client/typed/generated/extensions/unversioned/scale.go
Normal file
42
pkg/client/typed/generated/extensions/unversioned/scale.go
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
Copyright 2016 The Kubernetes Authors All rights reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package unversioned
|
||||
|
||||
// ScalesGetter has a method to return a ScaleInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ScalesGetter interface {
|
||||
Scales(namespace string) ScaleInterface
|
||||
}
|
||||
|
||||
// ScaleInterface has methods to work with Scale resources.
|
||||
type ScaleInterface interface {
|
||||
ScaleExpansion
|
||||
}
|
||||
|
||||
// scales implements ScaleInterface
|
||||
type scales struct {
|
||||
client *ExtensionsClient
|
||||
ns string
|
||||
}
|
||||
|
||||
// newScales returns a Scales
|
||||
func newScales(c *ExtensionsClient, namespace string) *scales {
|
||||
return &scales{
|
||||
client: c,
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user