Documentation ¶
Index ¶
- Constants
- func IsIdentitySupported(identity framework.ObjectIdentity, selectors []analysisapi.ResourceSelector) bool
- type BaseRecommender
- func (br *BaseRecommender) CheckDataProviders(ctx *framework.RecommendationContext) error
- func (br *BaseRecommender) CollectData(ctx *framework.RecommendationContext) error
- func (br *BaseRecommender) Filter(ctx *framework.RecommendationContext) error
- func (br *BaseRecommender) GetPercentile(percentile float64, ts []*common.TimeSeries) (float64, error)
- func (br *BaseRecommender) Name() string
- func (br *BaseRecommender) Observe(ctx *framework.RecommendationContext) error
- func (br *BaseRecommender) Policy(ctx *framework.RecommendationContext) error
- func (br *BaseRecommender) PostProcessing(ctx *framework.RecommendationContext) error
- func (br *BaseRecommender) PreRecommend(ctx *framework.RecommendationContext) error
- func (br *BaseRecommender) Recommend(ctx *framework.RecommendationContext) error
Constants ¶
View Source
const DefaultCreationCoolDown = time.Minute * 3
Variables ¶
This section is empty.
Functions ¶
func IsIdentitySupported ¶
func IsIdentitySupported(identity framework.ObjectIdentity, selectors []analysisapi.ResourceSelector) bool
IsIdentitySupported check whether object identity fit resource selector.
Types ¶
type BaseRecommender ¶
type BaseRecommender struct { apis.Recommender CreationCoolDown time.Duration }
func NewBaseRecommender ¶
func NewBaseRecommender(recommender apis.Recommender) *BaseRecommender
NewBaseRecommender create a new base recommender.
func (*BaseRecommender) CheckDataProviders ¶
func (br *BaseRecommender) CheckDataProviders(ctx *framework.RecommendationContext) error
CheckDataProviders in PrePrepare phase, will create data source provider via your recommendation config.
func (*BaseRecommender) CollectData ¶
func (br *BaseRecommender) CollectData(ctx *framework.RecommendationContext) error
func (*BaseRecommender) Filter ¶
func (br *BaseRecommender) Filter(ctx *framework.RecommendationContext) error
Filter out k8s resources that are not supported by the recommender.
func (*BaseRecommender) GetPercentile ¶ added in v0.11.0
func (br *BaseRecommender) GetPercentile(percentile float64, ts []*common.TimeSeries) (float64, error)
func (*BaseRecommender) Name ¶
func (br *BaseRecommender) Name() string
func (*BaseRecommender) Observe ¶
func (br *BaseRecommender) Observe(ctx *framework.RecommendationContext) error
Observe enhance the observability.
func (*BaseRecommender) Policy ¶
func (br *BaseRecommender) Policy(ctx *framework.RecommendationContext) error
Policy add some logic for result of recommend phase.
func (*BaseRecommender) PostProcessing ¶
func (br *BaseRecommender) PostProcessing(ctx *framework.RecommendationContext) error
func (*BaseRecommender) PreRecommend ¶
func (br *BaseRecommender) PreRecommend(ctx *framework.RecommendationContext) error
func (*BaseRecommender) Recommend ¶
func (br *BaseRecommender) Recommend(ctx *framework.RecommendationContext) error
Click to show internal directories.
Click to hide internal directories.