tsdb

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxQueryRange = 3600 * 24 * 5 // max time series data query range is 5 days
	MaxDownSample = 3600 * 24     // max down sample is 1 day
	MaxTagCount   = 16
)
View Source
const LineCountLimit = 100 // limit the max line count that a query can take
View Source
const OneDayMilliseconds = 3600 * 24 * 1000

Variables

This section is empty.

Functions

func Init

func Init(taosServer config.TaosConfig)

func QueryChartData

func QueryChartData(w http.ResponseWriter, r *http.Request)

func QueryCurves

func QueryCurves(w http.ResponseWriter, r *http.Request)

func QueryMetrics

func QueryMetrics(w http.ResponseWriter, r *http.Request)

QueryMetrics all metrics that start with the name in the request

func QueryTSDB

func QueryTSDB(sql string, totalColumn int) ([][]driver.Value, error)

QueryTSDB no reflection version, user need to parse value, but no need to open conn, query, parse each row

func QueryTagKeys

func QueryTagKeys(w http.ResponseWriter, r *http.Request)

QueryTagKeys query all tags of a metric

func QueryTagValues

func QueryTagValues(w http.ResponseWriter, r *http.Request)

func QueryTimeSeriesDataForRange

func QueryTimeSeriesDataForRange(w http.ResponseWriter, r *http.Request)

func QueryTopN

func QueryTopN(w http.ResponseWriter, r *http.Request)

Types

type ChartData

type ChartData struct {
	*protocol.CurveData
	Name string `json:"name"`
}

type ChartDataReq

type ChartDataReq struct {
	dbmodel.Chart
	Start  int64             `json:"start"`
	End    int64             `json:"end"`
	Filter map[string]string `json:"filter"`
}

Jump to

Keyboard shortcuts

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