provider

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CronHorizontal

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

CronHorizontal provides horizontal portraits with replicas values based on cron rules.

type DynamicHorizontal

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

DynamicHorizontal provides horizontal portraits with replicas values from external HorizontalPortraits.

func (*DynamicHorizontal) CleanupPortrait

type Horizontal

type Horizontal interface {
	// GetPortraitIdentifier returns a string identifier of the portrait managed by given IHPA and provider config.
	GetPortraitIdentifier(ihpa *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, cfg *autoscalingv1alpha1.HorizontalPortraitProvider) string
	// UpdatePortraitSpec creates or updates the portrait backend managed by given IHPA and provider config.
	UpdatePortraitSpec(ctx context.Context, ihpa *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, cfg *autoscalingv1alpha1.HorizontalPortraitProvider) error
	// FetchPortraitValue fetches the current value from the data of portrait managed by given IHPA and provider config.
	FetchPortraitValue(ctx context.Context, ihpa *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, cfg *autoscalingv1alpha1.HorizontalPortraitProvider) (*autoscalingv1alpha1.HorizontalPortraitValue, error)
	// CleanupPortrait does clean up works for the identified portrait managed by given IHPA.
	CleanupPortrait(ctx context.Context, ihpa *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, identifier string) error
}

Horizontal provides methods to manage horizontal portraits and fetch value from them.

func NewCronHorizontal

func NewCronHorizontal(eventTrigger chan event.GenericEvent) Horizontal

NewCronHorizontal creates a new CronHorizontal with the given event trigger.

func NewDynamicHorizontal

func NewDynamicHorizontal(client client.Client, eventTrigger chan event.GenericEvent) Horizontal

NewDynamicHorizontal creates a new DynamicHorizontal with the given Kubernetes client and event trigger.

func NewStaticHorizontal

func NewStaticHorizontal() Horizontal

NewStaticHorizontal creates a new StaticHorizontal.

Jump to

Keyboard shortcuts

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