Documentation ¶
Index ¶
- Constants
- func AggregateSignalKey(labels []common.Label) string
- type GenericPrediction
- func (p *GenericPrediction) DeleteQuery(namer metricnaming.MetricNamer, caller string) error
- func (p *GenericPrediction) GetHistoryProvider() providers.History
- func (p *GenericPrediction) GetRealtimeProvider() providers.RealTime
- func (p *GenericPrediction) WithQuery(namer metricnaming.MetricNamer, caller string, config config.Config) error
- type Interface
- type QueryExprWithCaller
- type Status
- type WithMetricEvent
Constants ¶
View Source
const ( HistoryProvider = "__history" RealtimeProvider = "__realtime" )
Variables ¶
This section is empty.
Functions ¶
func AggregateSignalKey ¶
Types ¶
type GenericPrediction ¶
type GenericPrediction struct { WithCh chan QueryExprWithCaller DelCh chan QueryExprWithCaller // contains filtered or unexported fields }
func NewGenericPrediction ¶
func NewGenericPrediction(realtimeProvider providers.RealTime, historyProvider providers.History, withCh, delCh chan QueryExprWithCaller) GenericPrediction
func (*GenericPrediction) DeleteQuery ¶ added in v0.3.0
func (p *GenericPrediction) DeleteQuery(namer metricnaming.MetricNamer, caller string) error
func (*GenericPrediction) GetHistoryProvider ¶
func (p *GenericPrediction) GetHistoryProvider() providers.History
func (*GenericPrediction) GetRealtimeProvider ¶
func (p *GenericPrediction) GetRealtimeProvider() providers.RealTime
func (*GenericPrediction) WithQuery ¶
func (p *GenericPrediction) WithQuery(namer metricnaming.MetricNamer, caller string, config config.Config) error
type Interface ¶
type Interface interface { // Run performs the prediction routine. Run(stopCh <-chan struct{}) // WithQuery registers a PromQL like query expression, so that the prediction will involve the time series that // are selected and aggregated through the specified 'queryExpr'. WithQuery(metricNamer metricnaming.MetricNamer, caller string, config config.Config) error DeleteQuery(metricNamer metricnaming.MetricNamer, caller string) error // QueryRealtimePredictedValues returns predicted values based on the specified query expression QueryRealtimePredictedValues(ctx context.Context, metricNamer metricnaming.MetricNamer) ([]*common.TimeSeries, error) // QueryPredictedTimeSeries returns predicted time series based on the specified query expression QueryPredictedTimeSeries(ctx context.Context, metricNamer metricnaming.MetricNamer, startTime time.Time, endTime time.Time) ([]*common.TimeSeries, error) // A analysis task function QueryRealtimePredictedValuesOnce(ctx context.Context, namer metricnaming.MetricNamer, config config.Config) ([]*common.TimeSeries, error) Name() string }
type QueryExprWithCaller ¶ added in v0.3.0
type QueryExprWithCaller struct { MetricNamer metricnaming.MetricNamer Config config.Config Caller string }
func (QueryExprWithCaller) String ¶ added in v0.3.0
func (q QueryExprWithCaller) String() string
type WithMetricEvent ¶
type WithMetricEvent struct { MetricName string Conditions []common.QueryCondition }
Click to show internal directories.
Click to hide internal directories.