Documentation
¶
Index ¶
- Constants
- func ResourcePortraitIndicatorPluginInitFunc(ctx context.Context, conf *controller.SPDConfig, _ interface{}, ...) (indicatorplugin.IndicatorPlugin, error)
- type AlgorithmProvider
- type ResourcePortraitIndicatorPlugin
- func (p *ResourcePortraitIndicatorPlugin) GetSupportedAggMetricsStatus() []string
- func (p *ResourcePortraitIndicatorPlugin) GetSupportedBusinessIndicatorSpec() []apiworkload.ServiceBusinessIndicatorName
- func (p *ResourcePortraitIndicatorPlugin) GetSupportedBusinessIndicatorStatus() []apiworkload.ServiceBusinessIndicatorName
- func (p *ResourcePortraitIndicatorPlugin) GetSupportedExtendedIndicatorSpec() []string
- func (p *ResourcePortraitIndicatorPlugin) GetSupportedSystemIndicatorSpec() []apiworkload.ServiceSystemIndicatorName
- func (p *ResourcePortraitIndicatorPlugin) Name() string
- func (p *ResourcePortraitIndicatorPlugin) Run()
Constants ¶
View Source
const (
ResourcePortraitPluginName = "ResourcePortraitIndicatorPlugin"
)
Variables ¶
This section is empty.
Functions ¶
func ResourcePortraitIndicatorPluginInitFunc ¶
func ResourcePortraitIndicatorPluginInitFunc(ctx context.Context, conf *controller.SPDConfig, _ interface{}, spdWorkloadInformer map[schema.GroupVersionResource]native.DynamicInformer, controlCtx *katalystbase.GenericContext, updater indicatorplugin.IndicatorUpdater, ) (indicatorplugin.IndicatorPlugin, error)
Types ¶
type AlgorithmProvider ¶
type AlgorithmProvider interface {
Method() string
SetConfig(cfg map[string]string)
SetMetrics(metrics map[string][]model.SamplePair)
// Call is used to call an external algorithm provider and return algorithm analysis data.
// The first return value represents time series data, the second return value is used to
// represent unstructured data, recorded in a form similar to tag=float/int/enum.
Call() (map[string][]timeSeriesItem, map[string]float64, error)
}
func NewAlgorithmProvider ¶
func NewAlgorithmProvider(addr, algorithmType string) (AlgorithmProvider, error)
type ResourcePortraitIndicatorPlugin ¶
type ResourcePortraitIndicatorPlugin struct {
// contains filtered or unexported fields
}
func (*ResourcePortraitIndicatorPlugin) GetSupportedAggMetricsStatus ¶
func (p *ResourcePortraitIndicatorPlugin) GetSupportedAggMetricsStatus() []string
func (*ResourcePortraitIndicatorPlugin) GetSupportedBusinessIndicatorSpec ¶
func (p *ResourcePortraitIndicatorPlugin) GetSupportedBusinessIndicatorSpec() []apiworkload.ServiceBusinessIndicatorName
func (*ResourcePortraitIndicatorPlugin) GetSupportedBusinessIndicatorStatus ¶
func (p *ResourcePortraitIndicatorPlugin) GetSupportedBusinessIndicatorStatus() []apiworkload.ServiceBusinessIndicatorName
func (*ResourcePortraitIndicatorPlugin) GetSupportedExtendedIndicatorSpec ¶
func (p *ResourcePortraitIndicatorPlugin) GetSupportedExtendedIndicatorSpec() []string
func (*ResourcePortraitIndicatorPlugin) GetSupportedSystemIndicatorSpec ¶
func (p *ResourcePortraitIndicatorPlugin) GetSupportedSystemIndicatorSpec() []apiworkload.ServiceSystemIndicatorName
func (*ResourcePortraitIndicatorPlugin) Name ¶
func (p *ResourcePortraitIndicatorPlugin) Name() string
func (*ResourcePortraitIndicatorPlugin) Run ¶
func (p *ResourcePortraitIndicatorPlugin) Run()
Click to show internal directories.
Click to hide internal directories.