Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetricsClient ¶ added in v0.2.0
func NewMetricsClient(metricProvider metricprovider.Interface) podautoscalermetrics.MetricsClient
NewMetricsClient creates a podautoscalermetrics.MetricsClient backed by given metric provider.
func NewPortraitGenerator ¶
func NewPortraitGenerator(metricProvider metricprovider.Interface, podLister corev1listers.PodLister, scaler *pkgscale.Scaler) portraitgenerator.Interface
NewPortraitGenerator creates a new PortraitGenerator with the given Kubernetes client, metrics provider and scaler.
Types ¶
type PortraitGenerator ¶
type PortraitGenerator struct {
// contains filtered or unexported fields
}
PortraitGenerator generates portraits reactively based on latest metrics.
func (*PortraitGenerator) GenerateHorizontal ¶
func (g *PortraitGenerator) GenerateHorizontal(ctx context.Context, namespace string, scaleTargetRef k8sautoscalingv2.CrossVersionObjectReference, metrics []autoscalingv1alpha1.MetricSpec, algorithm autoscalingv1alpha1.PortraitAlgorithm) (*autoscalingv1alpha1.HorizontalPortraitData, time.Duration, error)
Click to show internal directories.
Click to hide internal directories.