timeseriesprediction

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonTimeSeries2ApiTimeSeries

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

func GetTimeSeriesPredictionKey

func GetTimeSeriesPredictionKey(prediction *predictionv1alph1.TimeSeriesPrediction) string

func IsWindowInSamples

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

Types

type Controller

type Controller struct {
	client.Client
	Recorder     record.EventRecorder
	UpdatePeriod time.Duration
	// contains filtered or unexported fields
}

func NewController

func NewController(
	client client.Client,
	recorder record.EventRecorder,
	updatePeriod time.Duration,
	predictors map[predictionv1alph1.AlgorithmType]prediction.Interface,
) *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) error

SetupWithManager creates a controller and register to controller manager.

func (*Controller) UpdateStatus

func (tc *Controller) UpdateStatus(ctx context.Context, tsPrediction *v1alpha1.TimeSeriesPrediction, newStatus *v1alpha1.TimeSeriesPredictionStatus) error

Jump to

Keyboard shortcuts

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