Documentation ¶
Index ¶
- type CronHorizontal
- func (h *CronHorizontal) CleanupPortrait(_ context.Context, ...) error
- func (h *CronHorizontal) FetchPortraitValue(_ context.Context, ...) (*autoscalingv1alpha1.HorizontalPortraitValue, error)
- func (*CronHorizontal) GetPortraitIdentifier(*autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, ...) string
- func (h *CronHorizontal) UpdatePortraitSpec(_ context.Context, ...) error
- type DynamicHorizontal
- func (h *DynamicHorizontal) CleanupPortrait(ctx context.Context, ...) error
- func (h *DynamicHorizontal) FetchPortraitValue(ctx context.Context, ...) (*autoscalingv1alpha1.HorizontalPortraitValue, error)
- func (*DynamicHorizontal) GetPortraitIdentifier(_ *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, ...) string
- func (h *DynamicHorizontal) UpdatePortraitSpec(ctx context.Context, ...) error
- type Horizontal
- type StaticHorizontal
- func (*StaticHorizontal) CleanupPortrait(context.Context, *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, ...) error
- func (h *StaticHorizontal) FetchPortraitValue(_ context.Context, ...) (*autoscalingv1alpha1.HorizontalPortraitValue, error)
- func (*StaticHorizontal) GetPortraitIdentifier(*autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, ...) string
- func (*StaticHorizontal) UpdatePortraitSpec(context.Context, *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, ...) error
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.
func (*CronHorizontal) CleanupPortrait ¶
func (h *CronHorizontal) CleanupPortrait(_ context.Context, ihpa *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, _ string) error
func (*CronHorizontal) FetchPortraitValue ¶
func (h *CronHorizontal) FetchPortraitValue(_ context.Context, ihpa *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, cfg *autoscalingv1alpha1.HorizontalPortraitProvider) (*autoscalingv1alpha1.HorizontalPortraitValue, error)
func (*CronHorizontal) GetPortraitIdentifier ¶
func (*CronHorizontal) GetPortraitIdentifier(*autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, *autoscalingv1alpha1.HorizontalPortraitProvider) string
func (*CronHorizontal) UpdatePortraitSpec ¶
func (h *CronHorizontal) UpdatePortraitSpec(_ context.Context, ihpa *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, cfg *autoscalingv1alpha1.HorizontalPortraitProvider) error
type DynamicHorizontal ¶
type DynamicHorizontal struct {
// contains filtered or unexported fields
}
DynamicHorizontal provides horizontal portraits with replicas values from external HorizontalPortraits.
func (*DynamicHorizontal) CleanupPortrait ¶
func (h *DynamicHorizontal) CleanupPortrait(ctx context.Context, ihpa *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, identifier string) error
func (*DynamicHorizontal) FetchPortraitValue ¶
func (h *DynamicHorizontal) FetchPortraitValue(ctx context.Context, ihpa *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, cfg *autoscalingv1alpha1.HorizontalPortraitProvider) (*autoscalingv1alpha1.HorizontalPortraitValue, error)
func (*DynamicHorizontal) GetPortraitIdentifier ¶
func (*DynamicHorizontal) GetPortraitIdentifier(_ *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, cfg *autoscalingv1alpha1.HorizontalPortraitProvider) string
func (*DynamicHorizontal) UpdatePortraitSpec ¶
func (h *DynamicHorizontal) UpdatePortraitSpec(ctx context.Context, ihpa *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, cfg *autoscalingv1alpha1.HorizontalPortraitProvider) error
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.
type StaticHorizontal ¶
type StaticHorizontal struct{}
StaticHorizontal provides horizontal portraits with static replicas values.
func (*StaticHorizontal) CleanupPortrait ¶
func (*StaticHorizontal) CleanupPortrait(context.Context, *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, string) error
func (*StaticHorizontal) FetchPortraitValue ¶
func (h *StaticHorizontal) FetchPortraitValue(_ context.Context, ihpa *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, cfg *autoscalingv1alpha1.HorizontalPortraitProvider) (*autoscalingv1alpha1.HorizontalPortraitValue, error)
func (*StaticHorizontal) GetPortraitIdentifier ¶
func (*StaticHorizontal) GetPortraitIdentifier(*autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, *autoscalingv1alpha1.HorizontalPortraitProvider) string
func (*StaticHorizontal) UpdatePortraitSpec ¶
func (*StaticHorizontal) UpdatePortraitSpec(context.Context, *autoscalingv1alpha1.IntelligentHorizontalPodAutoscaler, *autoscalingv1alpha1.HorizontalPortraitProvider) error
Click to show internal directories.
Click to hide internal directories.