MCPcopy
hub / github.com/kubernetes/kubectl / Scaler

Interface Scaler

pkg/scale/scale.go:37–46  ·  view source on GitHub ↗

Scaler provides an interface for resources that can be scaled.

Source from the content-addressed store, hash-verified

35
36// Scaler provides an interface for resources that can be scaled.
37type Scaler interface {
38 // Scale scales the named resource after checking preconditions. It optionally
39 // retries in the event of resource version mismatch (if retry is not nil),
40 // and optionally waits until the status of the resource matches newSize (if wait is not nil)
41 // TODO: Make the implementation of this watch-based (#56075) once #31345 is fixed.
42 Scale(namespace, name string, newSize uint, actualSize *int32, preconditions *ScalePrecondition, retry, wait *RetryParams, gvr schema.GroupVersionResource, dryRun bool) error
43 // ScaleSimple does a simple one-shot attempt at scaling - not useful on its own, but
44 // a necessary building block for Scale
45 ScaleSimple(namespace, name string, preconditions *ScalePrecondition, newSize uint, gvr schema.GroupVersionResource, dryRun bool) (updatedResourceVersion string, actualSize int32, err error)
46}
47
48// NewScaler get a scaler for a given resource
49func NewScaler(scalesGetter scaleclient.ScalesGetter) Scaler {

Implementers 1

genericScalerpkg/scale/scale.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…