Skip to content

Commit

Permalink
Merge pull request #58 from influxdata/develop
Browse files Browse the repository at this point in the history
Release v0.1.2
  • Loading branch information
GeorgeMac authored Oct 18, 2019
2 parents 48ca925 + 67718fd commit 5c62df9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions writer/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// BucketMetricWriter is a type which Metrics can be written to a particular bucket
// in a particular organisation
type BucketMetricWriter interface {
Write(context.Context, string, string, ...influxdb.Metric) (int, error)
Write(ctx context.Context, bucket string, org string, m ...influxdb.Metric) (int, error)
}

// New constructs a point writer with an underlying buffer from the provided BucketMetricWriter
Expand Down Expand Up @@ -51,5 +51,5 @@ func NewBucketWriter(w BucketMetricWriter, bucket, org string) *BucketWriter {
// Write writes the provided metrics to the underlying metrics writer
// using the org and bucket configured on the bucket writer
func (b *BucketWriter) Write(m ...influxdb.Metric) (int, error) {
return b.w.Write(b.ctxt, b.org, b.bucket, m...)
return b.w.Write(b.ctxt, b.bucket, b.org, m...)
}
8 changes: 4 additions & 4 deletions writer/writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ func Test_BucketWriter(t *testing.T) {
wr = NewBucketWriter(spy, bucket, org)

expected = []bucketWriteCall{
{org, bucket, createTestRowMetrics(t, 4)},
{org, bucket, createTestRowMetrics(t, 8)},
{org, bucket, createTestRowMetrics(t, 12)},
{org, bucket, createTestRowMetrics(t, 16)},
{bucket, org, createTestRowMetrics(t, 4)},
{bucket, org, createTestRowMetrics(t, 8)},
{bucket, org, createTestRowMetrics(t, 12)},
{bucket, org, createTestRowMetrics(t, 16)},
}
)

Expand Down

0 comments on commit 5c62df9

Please sign in to comment.