Skip to content

Commit 1678fdd

Browse files
committed
document client functions a little more
1 parent a9a2363 commit 1678fdd

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

client.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,18 @@ func CleanQuery(query string) string {
2424
type Client interface {
2525
influxClient.Client
2626

27-
// UseDB sets the DB to use for Query, WritePoint, and WritePointTagsFields
27+
// UseDB sets the DB to use for Query, WritePoint, and WritePointTagsFields.
28+
// This field must be set before WritePoint... calls.
2829
UseDB(db string) Client
2930

30-
// UseMeasurement sets the measurement to use for WritePoint, and WritePointTagsFields
31+
// UseMeasurement sets the measurement to use for WritePoint, and WritePointTagsFields.
32+
// If this is not set, a struct field with named InfluxMeasurement is required
33+
// in the write data. The data passed in this call has priority over data fields in
34+
// writes.
3135
UseMeasurement(measurement string) Client
3236

33-
// UseTimeField sets the time field to use for WritePoint, and WritePointTagsFields
37+
// UseTimeField sets the time field to use for WritePoint, and WritePointTagsFields. This
38+
// call is optional, and a data struct field with a `influx:"time"` tag can also be used.
3439
UseTimeField(fieldName string) Client
3540

3641
// Query executes an InfluxDb query, and unpacks the result into the

0 commit comments

Comments
 (0)