@@ -475,7 +475,7 @@ type API interface {
475
475
// Flags returns the flag values that Prometheus was launched with.
476
476
Flags (ctx context.Context ) (FlagsResult , error )
477
477
// LabelNames returns the unique label names present in the block in sorted order by given time range and matchers.
478
- LabelNames (ctx context.Context , matches []string , startTime , endTime time.Time , opts ... Option ) ([] string , Warnings , error )
478
+ LabelNames (ctx context.Context , matches []string , startTime , endTime time.Time , opts ... Option ) (model. LabelNames , Warnings , error )
479
479
// LabelValues performs a query for the values of the given label, time range and matchers.
480
480
LabelValues (ctx context.Context , label string , matches []string , startTime , endTime time.Time , opts ... Option ) (model.LabelValues , Warnings , error )
481
481
// Query performs a query for the given time.
@@ -1024,7 +1024,7 @@ func (h *httpAPI) Runtimeinfo(ctx context.Context) (RuntimeinfoResult, error) {
1024
1024
return res , err
1025
1025
}
1026
1026
1027
- func (h * httpAPI ) LabelNames (ctx context.Context , matches []string , startTime , endTime time.Time , opts ... Option ) ([] string , Warnings , error ) {
1027
+ func (h * httpAPI ) LabelNames (ctx context.Context , matches []string , startTime , endTime time.Time , opts ... Option ) (model. LabelNames , Warnings , error ) {
1028
1028
u := h .client .URL (epLabels , nil )
1029
1029
q := addOptionalURLParams (u .Query (), opts )
1030
1030
@@ -1042,7 +1042,7 @@ func (h *httpAPI) LabelNames(ctx context.Context, matches []string, startTime, e
1042
1042
if err != nil {
1043
1043
return nil , w , err
1044
1044
}
1045
- var labelNames [] string
1045
+ var labelNames model. LabelNames
1046
1046
err = json .Unmarshal (body , & labelNames )
1047
1047
return labelNames , w , err
1048
1048
}
0 commit comments