feat(scale): add Patch method to ScaleInterface

Signed-off-by: knight42 <anonymousknight96@gmail.com>

Kubernetes-commit: f020c9159869918c63e0aad56abd01e655e61e78
This commit is contained in:
knight42
2019-07-29 12:33:24 +08:00
committed by Kubernetes Publisher
parent 396a06da3b
commit 70681df7b9
4 changed files with 160 additions and 50 deletions

View File

@@ -19,6 +19,7 @@ package scale
import (
autoscalingapi "k8s.io/api/autoscaling/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
)
// ScalesGetter can produce a ScaleInterface
@@ -36,4 +37,7 @@ type ScaleInterface interface {
// Update updates the scale of the given scalable resource.
Update(resource schema.GroupResource, scale *autoscalingapi.Scale) (*autoscalingapi.Scale, error)
// Patch patches the scale of the given scalable resource.
Patch(gvr schema.GroupVersionResource, name string, pt types.PatchType, data []byte) (*autoscalingapi.Scale, error)
}