Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoDataFound = errors.New("no data found")
)
Functions ¶
This section is empty.
Types ¶
type Evaluator ¶ added in v0.9.8
type Evaluator interface {
// InRange checks if the value is expected one.
InRange(value float64) bool
String() string
}
Evaluator evaluates the response from the metrics provider.
type Provider ¶
type Provider interface {
Type() string
// Evaluate runs the given query against the metrics provider,
// and then checks if the results are expected or not.
// Returns the result reason if non-error occurred.
// The first value "expected" must be false if err isn't nil.
Evaluate(ctx context.Context, query string, queryRange QueryRange, evaluator Evaluator) (expected bool, reason string, err error)
}
Provider represents a client for metrics provider which provides metrics for analysis.
type QueryRange ¶ added in v0.9.8
type QueryRange struct {
// Required: Start of the queried time period
From time.Time
// End of the queried time period. Defaults to the current time.
To time.Time
}
QueryRange represents a sliced time range.
func (*QueryRange) Validate ¶ added in v0.9.8
func (q *QueryRange) Validate() error
Click to show internal directories.
Click to hide internal directories.