scaler

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2015 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package scaler implements the kubectl.Scaler interface for deploymentConfigs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewScalerClient

func NewScalerClient(oc client.Interface, kc kclient.Interface) kubectl.ScalerClient

NewScalerClient returns a new Scaler client bundling both the OpenShift and Kubernetes clients

func ScalerFor

func ScalerFor(kind string, oc client.Interface, kc kclient.Interface) (kubectl.Scaler, error)

ScalerFor returns the appropriate Scaler client depending on the provided kind of resource (Replication controllers and deploymentConfigs supported)

Types

type DeploymentConfigScaler

type DeploymentConfigScaler struct {
	// contains filtered or unexported fields
}

DeploymentConfigScaler is a wrapper for the kubectl Scaler client

func (*DeploymentConfigScaler) Scale

func (scaler *DeploymentConfigScaler) Scale(namespace, name string, newSize uint, preconditions *kubectl.ScalePrecondition, retry, waitForReplicas *kubectl.RetryParams) error

Scale updates a replication controller created by the DeploymentConfig with the provided namespace/name, to a new size, with optional precondition check (if preconditions is not nil),optional retries (if retry

is not nil), and then optionally waits for it's replica count to reach the new value (if wait is not nil).

func (*DeploymentConfigScaler) ScaleSimple

func (scaler *DeploymentConfigScaler) ScaleSimple(namespace, name string, preconditions *kubectl.ScalePrecondition, newSize uint) (string, error)

ScaleSimple does a simple one-shot attempt at scaling - not useful on it's own, but a necessary building block for Scale

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL