promql

package
v2.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractSourceIds

func ExtractSourceIds(query string) ([]string, error)

TODO - move elsewhere and clean up [#160353522]

func ParseDuration

func ParseDuration(param string) (time.Duration, error)

func ParseStep

func ParseStep(param string) (time.Duration, error)

func ParseTime

func ParseTime(param string) (time.Time, error)

func ReplaceSourceIdSets

func ReplaceSourceIdSets(query string, sourceIDExpansions map[string][]string) (string, error)

func SanitizeMetricName

func SanitizeMetricName(name string) string

Types

type DataReader

type DataReader interface {
	Read(ctx context.Context, in *logcache_v1.ReadRequest) (*logcache_v1.ReadResponse, error)
}

type LogCacheQuerier

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

func (*LogCacheQuerier) Close

func (l *LogCacheQuerier) Close() error

func (*LogCacheQuerier) LabelValues

func (l *LogCacheQuerier) LabelValues(name string) ([]string, error)

func (*LogCacheQuerier) Select

func (l *LogCacheQuerier) Select(params *storage.SelectParams, ll ...*labels.Matcher) (storage.SeriesSet, error)

type Metrics

type Metrics interface {
	NewCounter(name string) func(delta uint64)
	NewGauge(name string) func(value float64)
}

type PromQL

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

func New

func New(
	r DataReader,
	m Metrics,
	log *log.Logger,
	queryTimeout time.Duration,
) *PromQL

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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