apis

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0, BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Recommender

type Recommender struct {
	// ResourceSelector indicates which resources(e.g. a set of Deployments) are accepted for plugin.
	// Override the accepted resources from recommender's interface
	AcceptedResourceSelectors []analysisapi.ResourceSelector `json:"acceptedResources"`
	// Name should be existed in all predefined recommenders
	Name string `json:"name"`
	// Override Recommender configs
	// +optional
	Config map[string]string `json:"config,omitempty"`
}

func (Recommender) GetConfigBool added in v0.11.0

func (r Recommender) GetConfigBool(key string, def bool) (bool, error)

func (Recommender) GetConfigDuration added in v0.11.0

func (r Recommender) GetConfigDuration(key string, def time.Duration) (time.Duration, error)

func (Recommender) GetConfigFloat added in v0.11.0

func (r Recommender) GetConfigFloat(key string, def float64) (float64, error)

func (Recommender) GetConfigInt added in v0.11.0

func (r Recommender) GetConfigInt(key string, def int64) (int64, error)

func (Recommender) GetConfigString added in v0.11.0

func (r Recommender) GetConfigString(key string, def string) string

type RecommenderConfiguration

type RecommenderConfiguration struct {
	metav1.TypeMeta `json:",inline"`

	// Recommender list
	Recommenders []Recommender `json:"recommenders"`

	// Recommender Plugin list
	RecommenderPlugins []RecommenderPlugin `json:"recommenderPlugins"`
}

type RecommenderPlugin

type RecommenderPlugin struct {
	// Name is the name for this plugin
	Name string `json:"name"`
	// Priority control the sequence when execute plugins
	Priority int32 `json:"priority,omitempty"`
	// ServerConfig
	ServerConfig ServerConfig `json:"serverConfig,omitempty"`
	// Override Recommender configs
	// +optional
	Config map[string]string `json:"config,omitempty"`
}

type ServerConfig

type ServerConfig struct {
	UrlPrefix string `json:"urlPrefix,omitempty"`
}

Jump to

Keyboard shortcuts

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