Merge pull request #45 from mattbostock/document_appender_not_goroutine_safe

db: Add comment: Appender not goroutine safe
This commit is contained in:
Fabian Reinartz 2017-04-17 12:12:20 +02:00 committed by GitHub
commit 46c947d94f

2
db.go
View file

@ -73,6 +73,8 @@ type Options struct {
// Appender allows appending a batch of data. It must be completed with a // Appender allows appending a batch of data. It must be completed with a
// call to Commit or Rollback and must not be reused afterwards. // call to Commit or Rollback and must not be reused afterwards.
//
// Operations on the Appender interface are not goroutine-safe.
type Appender interface { type Appender interface {
// Add adds a sample pair for the given series. A reference number is // Add adds a sample pair for the given series. A reference number is
// returned which can be used to add further samples in the same or later // returned which can be used to add further samples in the same or later