Support a telegraf.Metric.Split function

This commit is contained in:
Cameron Sparr
2016-12-05 13:00:37 +00:00
parent 11bc82379c
commit 6b0e863556
5 changed files with 229 additions and 10 deletions

View File

@@ -22,6 +22,10 @@ type Metric interface {
Serialize() []byte
String() string // convenience function for string(Serialize())
Copy() Metric
// Split will attempt to return multiple metrics with the same timestamp
// whose string representations are no longer than maxSize.
// Metrics with a single field may exceed the requested size.
Split(maxSize int) []Metric
// Tag functions
HasTag(key string) bool