Documentation ¶
Index ¶
Constants ¶
View Source
const ( MetricTypeNone = "none" MetricTypeString = "string" MetricTypeCounter = "counter" MetricTypeGauge = "gauge" MetricTypeGaugeFloat = "gauge_float" MetricTypeBinary = "binary" MetricTypeGEO = "geo" // Geo Coordinates or GPS )
Metric types
View Source
const ( FieldValue = "value" FieldLatitude = "latitude" FieldLongitude = "longitude" FieldAltitude = "altitude" )
Fields
View Source
const ( QueryKeyName = "name" QueryKeyMetricType = "metric_type" QueryKeyStart = "start" QueryKeyStop = "stop" QueryKeyWindow = "window" QueryKeyTags = "tags" QueryKeyFunctions = "functions" )
Metric query input parameters
View Source
const ( UnitNone = "" UnitCelsius = "°C" UnitFahrenheit = "°F" UnitPercent = "%" UnitVoltage = "V" UnitAmpere = "A" )
units used across providers
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InputData ¶
type InputData struct { MetricType string `json:"metricType"` Time time.Time `json:"timestamp"` Tags map[string]string `json:"tags"` Fields map[string]interface{} `json:"fields"` }
InputData to write
type Plugin ¶
type Plugin interface { Name() string Close() error Ping() error Write(data *InputData) error WriteBlocking(data *InputData) error Query(queryConfig *QueryConfig) (map[string][]ResponseData, error) }
Plugin interface
type Query ¶
type Query struct { Name string `json:"name"` MetricType string `json:"metricType"` Start string `json:"start"` Stop string `json:"stop"` Window string `json:"window"` Tags map[string]string `json:"tags"` Functions []string `json:"functions"` }
Query paramaters
type QueryConfig ¶
QueryConfig parameters
Click to show internal directories.
Click to hide internal directories.