Creating circleci job to just lint and vet code

This commit is contained in:
Cameron Sparr
2015-08-04 08:58:32 -06:00
parent 03c520798e
commit 3ff2ea8d4e
10 changed files with 93 additions and 15 deletions

View File

@@ -10,6 +10,8 @@ import (
"github.com/influxdb/influxdb/client"
)
// BatchPoints is used to send a batch of data in a single write from telegraf
// to influx
type BatchPoints struct {
mu sync.Mutex
@@ -22,6 +24,7 @@ type BatchPoints struct {
Config *ConfiguredPlugin
}
// Add adds a measurement
func (bp *BatchPoints) Add(measurement string, val interface{}, tags map[string]string) {
bp.mu.Lock()
defer bp.mu.Unlock()
@@ -55,6 +58,7 @@ func (bp *BatchPoints) Add(measurement string, val interface{}, tags map[string]
})
}
// AddValuesWithTime adds a measurement with a provided timestamp
func (bp *BatchPoints) AddValuesWithTime(
measurement string,
values map[string]interface{},