queryhandler

package
v0.0.0-...-2f9bd9a Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(db *minitsdb.Database) *queryHandler

Types

type QueryCluster

type QueryCluster struct {
	Parameters QueryClusterParameters
	SubQueries []*SubQuery
	TimeStart  time.Time
}

QueryCluster is used to collect multiple API queries to the same Series into a single query, which reduces load on the server

func (*QueryCluster) Execute

func (c *QueryCluster) Execute() error

type QueryClusterParameters

type QueryClusterParameters struct {
	Series   *minitsdb.Series
	Range    TimeRange
	TimeStep int64
}

QueryClusterParameters is separate struct so we can use it as a map index

type QueryResultWriter

type QueryResultWriter interface {
	Write(buffer storage.PointBuffer) error
}

type SubQuery

type SubQuery struct {
	Series  *minitsdb.Series       // the requested series
	Columns []minitsdb.QueryColumn // and columns

	// interface to the HTTP request
	Done   *sync.WaitGroup
	Cancel chan struct{}
	Sink   QueryResultWriter
}

QueryClusterReceiver

Jump to

Keyboard shortcuts

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