 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApaScalingAlgorithm ¶
type ApaScalingAlgorithm struct{}
    func (*ApaScalingAlgorithm) ComputeTargetReplicas ¶
func (a *ApaScalingAlgorithm) ComputeTargetReplicas(currentPodCount float64, context common.ScalingContext) int32
ComputeTargetReplicas - Apa's algorithm references and enhances the algorithm in the following paper: Huo, Qizheng, et al. "High Concurrency Response Strategy based on Kubernetes Horizontal Pod Autoscaler." Journal of Physics: Conference Series. Vol. 2451. No. 1. IOP Publishing, 2023.
type HpaScalingAlgorithm ¶
type HpaScalingAlgorithm struct{}
    HpaScalingAlgorithm can be used by any scaler without customized algorithms
func (*HpaScalingAlgorithm) ComputeTargetReplicas ¶
func (a *HpaScalingAlgorithm) ComputeTargetReplicas(currentPodCount float64, context common.ScalingContext) int32
type KpaScalingAlgorithm ¶
type KpaScalingAlgorithm struct{}
    func (*KpaScalingAlgorithm) ComputeTargetReplicas ¶
func (a *KpaScalingAlgorithm) ComputeTargetReplicas(currentPodCount float64, context common.ScalingContext) int32
type ScalingAlgorithm ¶
type ScalingAlgorithm interface {
	// ComputeTargetReplicas calculates the number of replicas needed based on current metrics
	// and the provided scaling specifications.
	//
	// Parameters:
	// currentPodCount - the current number of ready pods
	// context - an interface that provides access to scaling parameters like target values and tolerances
	//
	// Returns:
	// int32 - the calculated target number of replicas
	ComputeTargetReplicas(currentPodCount float64, context common.ScalingContext) int32
}
     Click to show internal directories. 
   Click to hide internal directories.