2015-05-23 07:45:14 +08:00
|
|
|
package telegraf
|
2015-04-07 00:32:10 +08:00
|
|
|
|
2016-01-28 05:21:36 +08:00
|
|
|
import "time"
|
2015-04-07 00:32:10 +08:00
|
|
|
|
2015-10-17 06:13:32 +08:00
|
|
|
type Accumulator interface {
|
2016-01-28 05:21:36 +08:00
|
|
|
// Create a point with a value, decorating it with tags
|
|
|
|
|
// NOTE: tags is expected to be owned by the caller, don't mutate
|
|
|
|
|
// it after passing to Add.
|
|
|
|
|
AddFields(measurement string,
|
|
|
|
|
fields map[string]interface{},
|
|
|
|
|
tags map[string]string,
|
|
|
|
|
t ...time.Time)
|
2015-05-20 13:19:32 +08:00
|
|
|
|
2016-07-25 20:09:49 +08:00
|
|
|
AddError(err error)
|
|
|
|
|
|
2015-10-17 06:13:32 +08:00
|
|
|
Debug() bool
|
|
|
|
|
SetDebug(enabled bool)
|
2016-06-13 22:21:11 +08:00
|
|
|
|
|
|
|
|
SetPrecision(precision, interval time.Duration)
|
|
|
|
|
|
|
|
|
|
DisablePrecision()
|
2015-04-07 00:32:10 +08:00
|
|
|
}
|