promql

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2018 License: Apache-2.0 Imports: 18 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,
) *PromQL

type PromqlMarshaler

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

func NewPromqlMarshaler

func NewPromqlMarshaler(fallback runtime.Marshaler) *PromqlMarshaler

func (*PromqlMarshaler) ContentType

func (m *PromqlMarshaler) ContentType() string

func (*PromqlMarshaler) Marshal

func (m *PromqlMarshaler) Marshal(v interface{}) ([]byte, error)

func (*PromqlMarshaler) NewDecoder

func (m *PromqlMarshaler) NewDecoder(r io.Reader) runtime.Decoder

func (*PromqlMarshaler) NewEncoder

func (m *PromqlMarshaler) NewEncoder(w io.Writer) runtime.Encoder

func (*PromqlMarshaler) Unmarshal

func (m *PromqlMarshaler) Unmarshal(data []byte, v interface{}) error

The special marshaling for PromQL results is currently only implemented for encoding.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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