scalercore

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Webhook = "Webhook"
	Event   = "Event"
	Cron    = "Cron"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CronScaler

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

CronScaler is a crontab GPA

func (*CronScaler) GetReplicas

func (s *CronScaler) GetReplicas(gpa *v1alpha1.GeneralPodAutoscaler, currentReplicas int32) (int32, error)

GetReplicas return replicas recommend by crontab GPA

func (*CronScaler) ScalerName

func (s *CronScaler) ScalerName() string

ScalerName returns scaler name

type EventScaler

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

func (*EventScaler) GetReplicas

func (*EventScaler) Run

func (e *EventScaler) Run(stopCh <-chan struct{}) error

func (*EventScaler) ScalerName

func (s *EventScaler) ScalerName() string

type LongRunScaler

type LongRunScaler interface {
	Scaler
	Run(<-chan struct{}) error
}

type Scaler

type Scaler interface {
	GetReplicas(*autoscalingv1.GeneralPodAutoscaler, int32) (int32, error)
	ScalerName() string
}

func NewCronScaler

func NewCronScaler(ranges []v1alpha1.TimeRange) Scaler

NewCronScaler initializer crontab GPA

func NewEventScaler

func NewEventScaler(schedule string) Scaler

func NewWebhookScaler

func NewWebhookScaler(modeConfig *autoscalingv1.WebhookMode) Scaler

type ScalerName

type ScalerName string

type WebhookScaler

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

func (*WebhookScaler) GetReplicas

func (s *WebhookScaler) GetReplicas(gpa *autoscalingv1.GeneralPodAutoscaler, currentReplicas int32) (int32, error)

func (*WebhookScaler) ScalerName

func (s *WebhookScaler) ScalerName() string

Jump to

Keyboard shortcuts

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