Documentation ¶
Index ¶
- func CommonTimeSeries2ApiTimeSeries(tsList []*common.TimeSeries) predictionapi.MetricTimeSeriesList
- func ExistsPredictionMetric(metric predictionapi.PredictionMetric, ...) bool
- func GetTimeSeriesPredictionKey(tsp *predictionapi.TimeSeriesPrediction) string
- func IsWindowInSamples(start, end time.Time, samples []predictionapi.Sample) bool
- type Controller
- func (tc *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (tc *Controller) SetupWithManager(mgr ctrl.Manager, maxConcurrentReconciles int) error
- func (tc *Controller) UpdateStatus(ctx context.Context, tsPrediction *predictionapi.TimeSeriesPrediction, ...) error
- type MetricContext
- func (c *MetricContext) ConvertApiMetric2InternalConfig(metric *predictionapi.PredictionMetric) *predconf.Config
- func (c *MetricContext) ConvertApiMetrics2InternalConfigs(metrics []predictionapi.PredictionMetric) []*predconf.Config
- func (c *MetricContext) DeleteApiConfig(conf *predictionapi.PredictionMetric)
- func (c *MetricContext) DeleteApiConfigs(configs []predictionapi.PredictionMetric)
- func (c *MetricContext) GetCaller() string
- func (c *MetricContext) GetMetricNamer(conf *predictionapi.PredictionMetric) metricnaming.MetricNamer
- func (c *MetricContext) ResourceToMetricNamer(resourceName *corev1.ResourceName, caller string) metricnaming.GeneralMetricNamer
- func (c *MetricContext) WithApiConfig(conf *predictionapi.PredictionMetric)
- func (c *MetricContext) WithApiConfigs(configs []predictionapi.PredictionMetric)
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) SetupWithManager ¶
func (tc *Controller) SetupWithManager(mgr ctrl.Manager, maxConcurrentReconciles int) error
SetupWithManager creates a controller and register to controller manager.
func (*Controller) UpdateStatus ¶
func (tc *Controller) UpdateStatus(ctx context.Context, tsPrediction *predictionapi.TimeSeriesPrediction, newStatus *predictionapi.TimeSeriesPredictionStatus) error
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 (c *MetricContext) GetMetricNamer(conf *predictionapi.PredictionMetric) metricnaming.MetricNamer
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)
Click to show internal directories.
Click to hide internal directories.