Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultRecentPointThreshold is default to 1 hour DefaultRecentPointThreshold = 3600 // DefaultExpirySeconds is default to 5 minutes DefaultExpirySeconds = 5 * 60 )
Variables ¶
View Source
var ( // DefaultHistogramAggregates XXX DefaultHistogramAggregates = []string{"max", "median", "avg", "count"} // DefaultHistogramPercentiles XXX DefaultHistogramPercentiles = []float64{0.95} )
Functions ¶
Types ¶
type Aggregator ¶
type Aggregator interface { AddMetrics(metricType string, prefix string, fields map[string]interface{}, tags []string, deviceName string, t ...int64) SubmitPackets(packet string) Add(metricType string, m Metric) Flush() }
Aggregator XXX
type Generator ¶
type Generator interface { Sample(value float64, timestamp int64) Flush(timestamp int64, interval float64) []Metric IsExpired(timestamp, expirySeconds int64) bool }
Generator generates metrics
type Metric ¶
type Metric struct { Name string Value interface{} Tags []string Hostname string DeviceName string Timestamp int64 LastSampleTime int64 Type string Samplerate float64 Formatter Formatter }
Metric XXX
Click to show internal directories.
Click to hide internal directories.