Add 'AddValuesWithTime' function to accumulator

This commit is contained in:
Evan Phoenix
2015-05-26 22:14:42 -07:00
parent dcd7861c1a
commit 2667183bfb
4 changed files with 100 additions and 9 deletions

View File

@@ -1,7 +1,22 @@
package plugins
import "time"
type Accumulator interface {
// Create a named point with a value, decorating it with named tags
// NOTE: tags is expected to be owned by the caller, don't mutate
// it after passing to Add.
Add(name string, value interface{}, tags map[string]string)
// Create a named point with a set of values, decorating it with named tags
// NOTE: tags and values are expected to be owned by the caller, don't mutate
// them after passing to AddValuesWithTime.
AddValuesWithTime(
name string,
values map[string]interface{},
tags map[string]string,
timestamp time.Time,
)
}
type Plugin interface {