vmselect

package
v0.0.0-...-ea98ea7 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLabelValues

func GetLabelValues(denyPartialResponse bool, labelName string, deadline searchutils.Deadline) ([]string, bool, error)

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

func InitStorageNodes

func InitStorageNodes(addrs []string)

InitStorageNodes initializes storage nodes' connections to the given addrs.

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.

func SearchTraceIDs

func SearchTraceIDs(denyPartialResponse bool, sq *storage.SearchQuery, deadline searchutils.Deadline) ([]storage.TraceID, bool, error)

func Stop

func Stop()

Stop gracefully stops netstorage.

Types

type Result

type Result struct {
	// The name of the metric.
	TraceID storage.TraceID

	// Values are sorted by Timestamps.
	Values     [][]byte
	Timestamps []int64
}

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(denyPartialResponse bool, sq *storage.SearchQuery, deadline searchutils.Deadline) (*Results, bool, error)

ProcessSearchQuery performs sq until the given deadline.

Results.RunParallel or Results.Cancel must be called on the returned Results.

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) error

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. Data processing is immediately stopped if f returns non-nil error.

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