Scaler provides an interface for resources that can be scaled.
| 35 | |
| 36 | // Scaler provides an interface for resources that can be scaled. |
| 37 | type 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 |
| 49 | func NewScaler(scalesGetter scaleclient.ScalesGetter) Scaler { |
no outgoing calls
no test coverage detected
searching dependent graphs…