mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-05 09:01:06 +00:00
Narrow interface consumed by scale client
Kubernetes-commit: d8b69a0a65ad40523f621f11ac296624b4d976b5
This commit is contained in:
committed by
Kubernetes Publisher
parent
e7bf2d1742
commit
8048d500b5
@@ -21,6 +21,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
@@ -34,6 +35,15 @@ import (
|
||||
scaleext "k8s.io/client-go/scale/scheme/extensionsv1beta1"
|
||||
)
|
||||
|
||||
// PreferredResourceMapper determines the preferred version of a resource to scale
|
||||
type PreferredResourceMapper interface {
|
||||
// ResourceFor takes a partial resource and returns the preferred resource.
|
||||
ResourceFor(resource schema.GroupVersionResource) (preferredResource schema.GroupVersionResource, err error)
|
||||
}
|
||||
|
||||
// Ensure a RESTMapper satisfies the PreferredResourceMapper interface
|
||||
var _ PreferredResourceMapper = meta.RESTMapper(nil)
|
||||
|
||||
// ScaleKindResolver knows about the relationship between
|
||||
// resources and the GroupVersionKind of their scale subresources.
|
||||
type ScaleKindResolver interface {
|
||||
|
Reference in New Issue
Block a user