executors

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

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

Go to latest
Published: Apr 29, 2024 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 PromqlExecutor

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

PromqlExecutor executes queries against local prometheus query engine

func NewPromqlExecutor

func NewPromqlExecutor(timeSeriesFile string) (*PromqlExecutor, error)

NewPromqlExecutor creates a new executor with time series and rules loaded from file Samples loaded from test file starts at time.Time.UTC(0,0)

func (*PromqlExecutor) Close

func (p *PromqlExecutor) Close()

func (*PromqlExecutor) Query

func (p *PromqlExecutor) Query(query string, queryTime time.Time) ([]*model.Sample, error)

Query queries prometheus mock engine with data loaded from file The start date for all queries is time.Time.UTC(0,0) Currently only queries that result in scalar are supported

Jump to

Keyboard shortcuts

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