converter

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeSeriesMetric            = "timeseries"
	CurrentValueMetric          = "currentvalue"
	DurationCountMetric         = "durationcount"
	DiscreteSensorChangesMetric = "changes"
	SensorNamespace             = "sensors"
	KpiNamespace                = "kpis"
	AverageStatistic            = "average" //TODO; we should either send timeseries or average
)
View Source
const (
	SensorAverage queryType = iota
	CurrentValue
	DurationCount
	DiscreteSensorChanges
	KpiCurrentValue
	Detailedkpi
	Unknown
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendQuery added in v0.11.7

type BackendQuery struct {
	types.Runnable
	RefId string
}

type Converter

type Converter struct {
	Range       *datasource.TimeRange
	RestClient  restclient.RestClient
	Environment types.Environment
	Logger      log.Logger
}

func (*Converter) Convert

func (c *Converter) Convert(refId string, spec *models.QuerySpecification, config *models.DatasourceSettings, timeRange backend.TimeRange) BackendQuery

func (*Converter) EndTime

func (c *Converter) EndTime() time.Time

func (*Converter) StartTime

func (c *Converter) StartTime() time.Time

Jump to

Keyboard shortcuts

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