Documentation ¶
Index ¶
Constants ¶
View Source
const Delimiter = "_"
Delimiter is used to split name into kind,namespace,name,replicacount
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerClassicScaler ¶
type DockerClassicScaler struct {
Client client.ContainerAPIClient
}
func NewDockerClassicScaler ¶
func NewDockerClassicScaler(client client.ContainerAPIClient) *DockerClassicScaler
func (*DockerClassicScaler) GetContainerByName ¶
func (*DockerClassicScaler) IsUp ¶
func (scaler *DockerClassicScaler) IsUp(name string) bool
func (*DockerClassicScaler) ScaleDown ¶
func (scaler *DockerClassicScaler) ScaleDown(name string) error
func (*DockerClassicScaler) ScaleUp ¶
func (scaler *DockerClassicScaler) ScaleUp(name string) error
type DockerSwarmScaler ¶
type DockerSwarmScaler struct {
Client client.ServiceAPIClient
}
func NewDockerSwarmScaler ¶
func NewDockerSwarmScaler() *DockerSwarmScaler
func (*DockerSwarmScaler) GetServiceByName ¶
func (*DockerSwarmScaler) IsUp ¶
func (scaler *DockerSwarmScaler) IsUp(name string) bool
func (*DockerSwarmScaler) ScaleDown ¶
func (scaler *DockerSwarmScaler) ScaleDown(name string) error
func (*DockerSwarmScaler) ScaleUp ¶
func (scaler *DockerSwarmScaler) ScaleUp(name string) error
type KubernetesScaler ¶
type KubernetesScaler struct {
Client *kubernetes.Clientset
}
func NewKubernetesScaler ¶
func NewKubernetesScaler(client *kubernetes.Clientset) *KubernetesScaler
func (*KubernetesScaler) IsUp ¶
func (scaler *KubernetesScaler) IsUp(name string) bool
func (*KubernetesScaler) ScaleDown ¶
func (scaler *KubernetesScaler) ScaleDown(name string) error
func (*KubernetesScaler) ScaleUp ¶
func (scaler *KubernetesScaler) ScaleUp(name string) error
type Workload ¶
type Workload interface { GetScale(ctx context.Context, workloadName string, options metav1.GetOptions) (*autoscalingv1.Scale, error) UpdateScale(ctx context.Context, workloadName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (*autoscalingv1.Scale, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.