Correct GetMeasurements comments to indicate default 100 limit

pull/10616/head
Jared Scheib 2018-04-02 17:11:36 -07:00
parent dffa082d7c
commit f1d9f8beb0
3 changed files with 5 additions and 5 deletions

View File

@ -500,7 +500,7 @@ type Databases interface {
// DropRP drops a retention policy in the current data source
DropRP(context.Context, string, string) error
// GetMeasurements lists some or all measurements in the current data source
// GetMeasurements lists measurements in the current data source
GetMeasurements(ctx context.Context, db string, limit, offset int) ([]Measurement, error)
}

View File

@ -151,9 +151,9 @@ func (c *Client) DropRP(ctx context.Context, database string, rp string) error {
return nil
}
// GetMeasurements returns measurements for a specific database. It allows for
// paging via limit and offset. If no limit or offset is provided, it returns
// all measurements.
// GetMeasurements returns measurements in a specified database, paginated by
// optional limit and offset. If no limit or offset is provided, it defaults to
// a limit of 100 measurements with no offset.
func (c *Client) GetMeasurements(ctx context.Context, database string, limit, offset int) ([]chronograf.Measurement, error) {
return c.showMeasurements(ctx, database, limit, offset)
}

View File

@ -63,7 +63,7 @@ func (d *Databases) DropRP(ctx context.Context, rpX string, rpY string) error {
return d.DropRPF(ctx, rpX, rpY)
}
// GetMeasurements lists some or all measurements in the current data source
// GetMeasurements lists measurements in the current data source
func (d *Databases) GetMeasurements(ctx context.Context, dbID string, limit, offset int) ([]chronograf.Measurement, error) {
return d.GetMeasurementsF(ctx, dbID, limit, offset)
}