query

package
v0.0.0-...-6ee8545 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultQueryTimeout         = time.Minute * 2
	DefaultLookBackDelta        = time.Minute * 5
	DefaultSubqueryStepInterval = time.Minute
	DefaultMaxSamples           = 50000000
)

Variables

This section is empty.

Functions

func NewEngine

func NewEngine(logger log.Logger, queryTimeout, lookBackDelta, subqueryDefaultStepInterval time.Duration, maxSamples int, enabledFeaturesMap map[string]struct{}) (*promql.Engine, error)

func NewQueryable

func NewQueryable(q pgQuerier.Querier, labelsReader lreader.LabelsReader) promql.Queryable

func Validate

func Validate(cfg *Config) error

Types

type CommaSeparatedList

type CommaSeparatedList []string

func (*CommaSeparatedList) Set

func (v *CommaSeparatedList) Set(s string) error

func (*CommaSeparatedList) String

func (v *CommaSeparatedList) String() string

type Config

type Config struct {
	EnabledFeatureMap           map[string]struct{}
	PromscaleEnabledFeatureList CommaSeparatedList

	MaxQueryTimeout      time.Duration
	SubQueryStepInterval time.Duration // Default step interval value if the user has not provided.
	LookBackDelta        time.Duration
	MaxSamples           int
	MaxPointsPerTs       int64
}

func ParseFlags

func ParseFlags(fs *flag.FlagSet, cfg *Config) *Config

Jump to

Keyboard shortcuts

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