Help us shape the future of Go! Take the 2026 Go Developer Survey

query

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrMaxSamplesExceeded added in v0.6.0

type ErrMaxSamplesExceeded struct {
	Current int64
	Limit   int64
}

func (ErrMaxSamplesExceeded) Error added in v0.6.0

func (e ErrMaxSamplesExceeded) Error() string

type Options

type Options struct {
	Start                    time.Time
	End                      time.Time
	Step                     time.Duration
	StepsBatch               int
	LookbackDelta            time.Duration
	EnablePerStepStats       bool
	ExtLookbackDelta         time.Duration
	NoStepSubqueryIntervalFn func(time.Duration) time.Duration
	EnableAnalysis           bool
	DecodingConcurrency      int
	SampleTracker            SampleTracker // Tracks current samples in memory
}

func NestedOptionsForSubquery

func NestedOptionsForSubquery(opts *Options, step, queryRange, offset time.Duration) *Options

func (*Options) IsInstantQuery

func (o *Options) IsInstantQuery() bool

func (*Options) NumStepsPerBatch added in v0.5.0

func (o *Options) NumStepsPerBatch() int

func (*Options) TotalSteps added in v0.5.0

func (o *Options) TotalSteps() int

TotalSteps returns the total number of steps in the query, regardless of batching. This is useful for pre-allocating result slices.

func (*Options) WithEndTime

func (o *Options) WithEndTime(end time.Time) *Options

type SampleTracker added in v0.6.0

type SampleTracker interface {
	Add(count int)
	Remove(count int)
	CheckLimit() error
	Limit() int64
}

func NewSampleTracker added in v0.6.0

func NewSampleTracker(maxSamples int) SampleTracker

Jump to

Keyboard shortcuts

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