@@ -237,7 +237,7 @@ type API interface {
237
237
// QueryRange performs a query for the given range.
238
238
QueryRange (ctx context.Context , query string , r Range ) (model.Value , api.Warnings , error )
239
239
// Series finds series by label matchers.
240
- Series (ctx context.Context , matches []string , startTime time.Time , endTime time.Time ) ([]model.LabelSet , error )
240
+ Series (ctx context.Context , matches []string , startTime time.Time , endTime time.Time ) ([]model.LabelSet , api. Warnings , error )
241
241
// Snapshot creates a snapshot of all current data into snapshots/<datetime>-<rand>
242
242
// under the TSDB's data directory and returns the directory as response.
243
243
Snapshot (ctx context.Context , skipHead bool ) (SnapshotResult , error )
@@ -696,7 +696,7 @@ func (h *httpAPI) QueryRange(ctx context.Context, query string, r Range) (model.
696
696
return model .Value (qres .v ), warnings , json .Unmarshal (body , & qres )
697
697
}
698
698
699
- func (h * httpAPI ) Series (ctx context.Context , matches []string , startTime time.Time , endTime time.Time ) ([]model.LabelSet , error ) {
699
+ func (h * httpAPI ) Series (ctx context.Context , matches []string , startTime time.Time , endTime time.Time ) ([]model.LabelSet , api. Warnings , error ) {
700
700
u := h .client .URL (epSeries , nil )
701
701
q := u .Query ()
702
702
@@ -711,16 +711,16 @@ func (h *httpAPI) Series(ctx context.Context, matches []string, startTime time.T
711
711
712
712
req , err := http .NewRequest (http .MethodGet , u .String (), nil )
713
713
if err != nil {
714
- return nil , err
714
+ return nil , nil , err
715
715
}
716
716
717
- _ , body , _ , err := h .client .Do (ctx , req )
717
+ _ , body , warnings , err := h .client .Do (ctx , req )
718
718
if err != nil {
719
- return nil , err
719
+ return nil , warnings , err
720
720
}
721
721
722
722
var mset []model.LabelSet
723
- return mset , json .Unmarshal (body , & mset )
723
+ return mset , warnings , json .Unmarshal (body , & mset )
724
724
}
725
725
726
726
func (h * httpAPI ) Snapshot (ctx context.Context , skipHead bool ) (SnapshotResult , error ) {
0 commit comments