Documentation ¶
Index ¶
- func DeleteSeries(sq *storage.SearchQuery) (int, error)
- func GetLabelEntries(deadline Deadline) ([]storage.TagEntry, error)
- func GetLabelValues(labelName string, deadline Deadline) ([]string, error)
- func GetLabels(deadline Deadline) ([]string, error)
- func GetSeriesCount(deadline Deadline) (uint64, error)
- func GetTSDBStatusForDate(deadline Deadline, date uint64, topN int) (*storage.TSDBStatus, error)
- type Deadline
- type Result
- type Results
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteSeries ¶
func DeleteSeries(sq *storage.SearchQuery) (int, error)
DeleteSeries deletes time series matching the given tagFilterss.
func GetLabelEntries ¶ added in v1.19.0
GetLabelEntries returns all the label entries until the given deadline.
func GetLabelValues ¶
GetLabelValues returns label values for the given labelName until the given deadline.
func GetSeriesCount ¶
GetSeriesCount returns the number of unique series.
func GetTSDBStatusForDate ¶ added in v1.35.0
GetTSDBStatusForDate returns tsdb status according to https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-stats
Types ¶
type Deadline ¶
type Deadline struct {
// contains filtered or unexported fields
}
Deadline contains deadline with the corresponding timeout for pretty error messages.
func NewDeadline ¶
NewDeadline returns deadline for the given timeout.
flagHint must contain a hit for command-line flag, which could be used in order to increase timeout.
type Result ¶
type Result struct { // The name of the metric. MetricName storage.MetricName // Values are sorted by Timestamps. Values []float64 Timestamps []int64 // Marshaled MetricName. Used only for results sorting // in app/vmselect/promql MetricNameMarshaled []byte }
Result is a single timeseries result.
ProcessSearchQuery returns Result slice.
type Results ¶
type Results struct {
// contains filtered or unexported fields
}
Results holds results returned from ProcessSearchQuery.
func ProcessSearchQuery ¶
func ProcessSearchQuery(sq *storage.SearchQuery, fetchData bool, deadline Deadline) (*Results, error)
ProcessSearchQuery performs sq on storage nodes until the given deadline.
Results.RunParallel or Results.Cancel must be called on the returned Results.
func (*Results) RunParallel ¶
RunParallel runs f in parallel for all the results from rss.
f shouldn't hold references to rs after returning. workerID is the id of the worker goroutine that calls f.
rss becomes unusable after the call to RunParallel.