Documentation
¶
Index ¶
Constants ¶
View Source
const ( HistoryProvider = "__history" RealtimeProvider = "__realtime" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GenericPrediction ¶
type GenericPrediction struct {
// contains filtered or unexported fields
}
func NewGenericPrediction ¶
func NewGenericPrediction(withQueryBroadcaster config.Broadcaster) GenericPrediction
func (*GenericPrediction) GetHistoryProvider ¶
func (p *GenericPrediction) GetHistoryProvider() providers.Interface
func (*GenericPrediction) GetRealtimeProvider ¶
func (p *GenericPrediction) GetRealtimeProvider() providers.Interface
func (*GenericPrediction) WithProviders ¶
func (p *GenericPrediction) WithProviders(providers map[string]providers.Interface)
func (*GenericPrediction) WithQuery ¶
func (p *GenericPrediction) WithQuery(query string) error
type Interface ¶
type Interface interface {
// Run performs the prediction routine.
Run(stopCh <-chan struct{})
// WithProviders registers providers from which metrics data come from
WithProviders(map[string]providers.Interface)
// 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(queryExpr string) error
// QueryRealtimePredictedValues returns predicted values based on the specified query expression
QueryRealtimePredictedValues(queryExpr string) ([]*common.TimeSeries, error)
// QueryPredictedTimeSeries returns predicted time series based on the specified query expression
QueryPredictedTimeSeries(queryExpr string, startTime time.Time, endTime time.Time) ([]*common.TimeSeries, error)
Name() string
}
type WithMetricEvent ¶
type WithMetricEvent struct {
MetricName string
Conditions []common.QueryCondition
}
Click to show internal directories.
Click to hide internal directories.