timeseriesprediction

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: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonTimeSeries2ApiTimeSeries

func CommonTimeSeries2ApiTimeSeries(tsList []*common.TimeSeries) predictionapi.MetricTimeSeriesList

func ExistsPredictionMetric

func ExistsPredictionMetric(metric predictionapi.PredictionMetric, metrics []predictionapi.PredictionMetric) bool

func GetTimeSeriesPredictionKey

func GetTimeSeriesPredictionKey(tsp *predictionapi.TimeSeriesPrediction) string

func IsWindowInSamples

func IsWindowInSamples(start, end time.Time, samples []predictionapi.Sample) bool

Types

type Controller

type Controller struct {
	client.Client
	Recorder      record.EventRecorder
	UpdatePeriod  time.Duration
	TargetFetcher target.SelectorFetcher
	Scheme        *runtime.Scheme
	RestMapper    meta.RESTMapper
	ScaleClient   scale.ScalesGetter
	// contains filtered or unexported fields
}

func NewController

func NewController(
	client client.Client,
	recorder record.EventRecorder,
	updatePeriod time.Duration,
	predictorMgr predictormgr.Manager,
	targetFetcher target.SelectorFetcher,
) *Controller

func (*Controller) Reconcile

func (tc *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile reconcile the time series prediction

func (*Controller) SetupWithManager

func (tc *Controller) SetupWithManager(mgr ctrl.Manager, maxConcurrentReconciles int) error

SetupWithManager creates a controller and register to controller manager.

func (*Controller) UpdateStatus

type MetricContext added in v0.3.0

type MetricContext struct {
	Namespace        string
	TargetKind       string
	Name             string
	APIVersion       string
	Selector         labels.Selector
	SeriesPrediction *predictionapi.TimeSeriesPrediction
	// contains filtered or unexported fields
}

func NewMetricContext

func NewMetricContext(fetcher target.SelectorFetcher, seriesPrediction *predictionapi.TimeSeriesPrediction, predictorMgr predictormgr.Manager) (*MetricContext, error)

func (*MetricContext) ConvertApiMetric2InternalConfig added in v0.3.0

func (c *MetricContext) ConvertApiMetric2InternalConfig(metric *predictionapi.PredictionMetric) *predconf.Config

ConvertApiMetric2InternalConfig

func (*MetricContext) ConvertApiMetrics2InternalConfigs added in v0.3.0

func (c *MetricContext) ConvertApiMetrics2InternalConfigs(metrics []predictionapi.PredictionMetric) []*predconf.Config

ConvertApiMetrics2InternalConfigs

func (*MetricContext) DeleteApiConfig added in v0.3.0

func (c *MetricContext) DeleteApiConfig(conf *predictionapi.PredictionMetric)

func (*MetricContext) DeleteApiConfigs added in v0.3.0

func (c *MetricContext) DeleteApiConfigs(configs []predictionapi.PredictionMetric)

func (*MetricContext) GetCaller added in v0.3.0

func (c *MetricContext) GetCaller() string

func (*MetricContext) GetMetricNamer added in v0.3.0

func (*MetricContext) ResourceToMetricNamer added in v0.3.0

func (c *MetricContext) ResourceToMetricNamer(resourceName *corev1.ResourceName, caller string) metricnaming.GeneralMetricNamer

func (*MetricContext) WithApiConfig added in v0.3.0

func (c *MetricContext) WithApiConfig(conf *predictionapi.PredictionMetric)

func (*MetricContext) WithApiConfigs added in v0.3.0

func (c *MetricContext) WithApiConfigs(configs []predictionapi.PredictionMetric)

Jump to

Keyboard shortcuts

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