diff --git a/client/v2/client.go b/client/v2/client.go index 369b5d5445..c5fbc2d97d 100644 --- a/client/v2/client.go +++ b/client/v2/client.go @@ -229,6 +229,8 @@ type udpclient struct { type BatchPoints interface { // AddPoint adds the given point to the Batch of points AddPoint(p *Point) + // AddPoints adds the given points to the Batch of points + AddPoints(ps []*Point) // Points lists the points in the Batch Points() []*Point @@ -282,6 +284,10 @@ func (bp *batchpoints) AddPoint(p *Point) { bp.points = append(bp.points, p) } +func (bp *batchpoints) AddPoints(ps []*Point) { + bp.points = append(bp.points, ps...) +} + func (bp *batchpoints) Points() []*Point { return bp.points }