From 68f468817d4ddb24077e19cf977d1949286c658b Mon Sep 17 00:00:00 2001 From: Nathaniel Cook Date: Fri, 11 Mar 2016 10:28:05 -0700 Subject: [PATCH] add AddPoints method to v2 client --- client/v2/client.go | 6 ++++++ 1 file changed, 6 insertions(+) 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 }