executor

package
v2.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPausedReplicaCount added in v2.7.0

func GetPausedReplicaCount(scaledObject *kedav1alpha1.ScaledObject) (*int32, error)

GetPausedReplicaCount returns the paused replica count of the ScaledObject. If not paused, it returns nil.

Types

type ScaleExecutor

type ScaleExecutor interface {
	RequestJobScale(ctx context.Context, scaledJob *kedav1alpha1.ScaledJob, isActive bool, isError bool, scaleTo int64, maxScale int64)
	RequestScale(ctx context.Context, scaledObject *kedav1alpha1.ScaledObject, isActive bool, isError bool, options *ScaleExecutorOptions)
}

ScaleExecutor contains methods RequestJobScale and RequestScale

func NewScaleExecutor

func NewScaleExecutor(client runtimeclient.Client, scaleClient scale.ScalesGetter, reconcilerScheme *runtime.Scheme, recorder record.EventRecorder) ScaleExecutor

NewScaleExecutor creates a ScaleExecutor object

type ScaleExecutorOptions added in v2.14.0

type ScaleExecutorOptions struct {
	ActiveTriggers []string
}

ScaleExecutorOptions contains the optional parameters for the RequestScale method.

type ScalingStrategy

type ScalingStrategy interface {
	GetEffectiveMaxScale(maxScale, runningJobCount, pendingJobCount, maxReplicaCount, scaleTo int64) (int64, int64)
}

ScalingStrategy is an interface for switching scaling algorithm

func NewScalingStrategy

func NewScalingStrategy(logger logr.Logger, scaledJob *kedav1alpha1.ScaledJob) ScalingStrategy

NewScalingStrategy returns ScalingStrategy instance

Jump to

Keyboard shortcuts

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