netstorage

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: Apache-2.0 Imports: 18 Imported by: 4

Documentation

Index

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

func GetLabelEntries(deadline Deadline) ([]storage.TagEntry, error)

GetLabelEntries returns all the label entries until the given deadline.

func GetLabelValues

func GetLabelValues(labelName string, deadline Deadline) ([]string, error)

GetLabelValues returns label values for the given labelName until the given deadline.

func GetLabels

func GetLabels(deadline Deadline) ([]string, error)

GetLabels returns labels until the given deadline.

func GetSeriesCount

func GetSeriesCount(deadline Deadline) (uint64, error)

GetSeriesCount returns the number of unique series.

func InitTmpBlocksDir

func InitTmpBlocksDir(tmpDirPath string)

InitTmpBlocksDir initializes directory to store temporary search results.

It stores data in system-defined temporary directory if tmpDirPath is empty.

Types

type Deadline

type Deadline struct {
	Deadline time.Time
	// contains filtered or unexported fields
}

Deadline contains deadline with the corresponding timeout for pretty error messages.

func NewDeadline

func NewDeadline(timeout time.Duration, flagHint string) Deadline

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.

func (*Deadline) String added in v1.32.7

func (d *Deadline) String() string

String returns human-readable string representation for d.

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.

func (*Results) Cancel

func (rss *Results) Cancel()

Cancel cancels rss work.

func (*Results) Len

func (rss *Results) Len() int

Len returns the number of results in rss.

func (*Results) RunParallel

func (rss *Results) RunParallel(f func(rs *Result, workerID uint)) error

RunParallel runs in parallel f 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.

Jump to

Keyboard shortcuts

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