mpa

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResourceHandler

func NewResourceHandler(preProcessor PreProcessor) resource.Handler

NewResourceHandler creates new instance of resourceHandler.

func ValidateMPA

func ValidateMPA(mpa *mpa_types.MultidimPodAutoscaler, isCreate bool) error

ValidateMPA checks the correctness of MPA Spec and returns an error if there is a problem.

Types

type Matcher

type Matcher interface {
	GetMatchingMPA(pod *core.Pod) *mpa_types.MultidimPodAutoscaler
}

Matcher is capable of returning a single matching MPA object for a pod. Will return nil if no matching object is found.

func NewMatcher

func NewMatcher(mpaLister mpa_lister.MultidimPodAutoscalerLister,
	selectorFetcher target.MpaTargetSelectorFetcher) Matcher

NewMatcher returns a new MPA matcher.

type PreProcessor

type PreProcessor interface {
	Process(mpa *mpa_types.MultidimPodAutoscaler, isCreate bool) (*mpa_types.MultidimPodAutoscaler, error)
}

PreProcessor processes the MPAs before applying default .

func NewDefaultPreProcessor

func NewDefaultPreProcessor() PreProcessor

NewDefaultPreProcessor creates a PreProcessor that leaves MPAs unchanged and returns no error

Jump to

Keyboard shortcuts

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