csvquery

package
v4.15.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2018 License: AGPL-3.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// AlignedWindowsQuery specifies that an Aligned Windows query (i.e.
	// Statistical Values query) should be made.
	AlignedWindowsQuery = iota

	// WindowsQuery specifies that a Windows query should be made.
	WindowsQuery

	// RawQuery specifies that a Raw Values query should be made.
	RawQuery
)

Variables

This section is empty.

Functions

func MakeCSVQuery

func MakeCSVQuery(ctx context.Context, b *btrdb.BTrDB, q *CSVQuery, w *csv.Writer) error

MakeCSVQuery performs a CSV query, and outputs the result using the provided CSV writer.

Types

type CSVQuery

type CSVQuery struct {
	// QueryType should be one of AlignedWindowsQuery, WindowsQuery, or
	// RawQuery. It specifies what data should be in the CSV file for each
	// stream.
	QueryType int

	// StartTime is the start time for the query, in nanoseconds.
	StartTime int64

	// EndTime is the end time for the query, in nanoseconds.
	EndTime int64

	// WindowSize specifies the size of the window, in nanoseconds, for a
	// Windows query. It is ignored for Aligned Windows queries and Raw Values
	// queries.
	WindowSize uint64

	// Depth specifies the point width exponent for AlignedWindows queries, and
	// the maximum depth for Windows queries. It is ignored for Raw Values
	// queries.
	Depth uint8

	// Streams is a slice of streams to query.
	Streams []*btrdb.Stream

	// Versions is a slice of version numbers to query for each stream.
	// Defaults to 0 (most recent version) for all streams if nil.
	Versions []uint64

	// Labels contains the name to use for each stream in the output CSV file.
	Labels []string

	// IncludeVersions specifies whether the version number of each stream
	// should be included in the CSV header.
	IncludeVersions bool
}

CSVQuery stores the parameters for a CSV query.

Jump to

Keyboard shortcuts

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