querier

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Series

type Series interface {
	// Labels returns the complete set of labels identifying the series.
	Labels() utils.Labels

	// Iterator returns a new iterator of the data of the series.
	Iterator() SeriesIterator
}

Series represents a single time series.

func NewSeries

func NewSeries(set *V3ioSeriesSet) Series

Create a new series from chunks

type SeriesIterator

type SeriesIterator interface {
	// Seek advances the iterator forward to the given timestamp.
	// If there's no value exactly at t, it advances to the first value
	// after t.
	Seek(t int64) bool
	// At returns the current timestamp/value pair.
	At() (t int64, v float64)
	// Next advances the iterator by one.
	Next() bool
	// Err returns the current error.
	Err() error
}

SeriesIterator iterates over the data of a time series.

type SeriesSet

type SeriesSet interface {
	Next() bool
	At() Series
	Err() error
}

SeriesSet contains a set of series.

type V3ioQuerier

type V3ioQuerier struct {
	// contains filtered or unexported fields
}

func NewV3ioQuerier

func NewV3ioQuerier(container *v3io.Container, logger logger.Logger, mint, maxt int64,
	cfg *config.V3ioConfig, partMngr *partmgr.PartitionManager) *V3ioQuerier

Create a new Querier interface

func (*V3ioQuerier) Close

func (q *V3ioQuerier) Close() error

func (*V3ioQuerier) LabelValues

func (q *V3ioQuerier) LabelValues(name string) ([]string, error)

return the current metric names

func (*V3ioQuerier) Select

func (q *V3ioQuerier) Select(name, functions string, step int64, filter string) (SeriesSet, error)

Standard Time Series Query, return a set of series which match the condition

func (*V3ioQuerier) SelectOverlap

func (q *V3ioQuerier) SelectOverlap(name, functions string, step int64, win []int, filter string) (SeriesSet, error)

Overlapping windows Time Series Query, return a set of series each with a list of aggregated results per window e.g. get the last 1hr, 6hr, 24hr stats per metric (specify a 1hr step of 3600*1000, 1,6,24 windows, and max time)

type V3ioSeries

type V3ioSeries struct {
	// contains filtered or unexported fields
}

func NewAggrSeries

func NewAggrSeries(set *V3ioSeriesSet, aggr aggregate.AggrType) *V3ioSeries

func (*V3ioSeries) Iterator

func (s *V3ioSeries) Iterator() SeriesIterator

func (*V3ioSeries) Labels

func (s *V3ioSeries) Labels() utils.Labels

type V3ioSeriesSet

type V3ioSeriesSet struct {
	// contains filtered or unexported fields
}

holds the query result set

func (*V3ioSeriesSet) At

func (s *V3ioSeriesSet) At() Series

return a series iterator

func (*V3ioSeriesSet) Err

func (s *V3ioSeriesSet) Err() error

return current error

func (*V3ioSeriesSet) Next

func (s *V3ioSeriesSet) Next() bool

advance to the next series

Jump to

Keyboard shortcuts

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