@@ -475,7 +475,7 @@ type API interface {
475475 // Flags returns the flag values that Prometheus was launched with.
476476 Flags (ctx context.Context ) (FlagsResult , error )
477477 // 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 )
479479 // LabelValues performs a query for the values of the given label, time range and matchers.
480480 LabelValues (ctx context.Context , label string , matches []string , startTime , endTime time.Time , opts ... Option ) (model.LabelValues , Warnings , error )
481481 // Query performs a query for the given time.
@@ -1024,7 +1024,7 @@ func (h *httpAPI) Runtimeinfo(ctx context.Context) (RuntimeinfoResult, error) {
10241024 return res , err
10251025}
10261026
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 ) {
10281028 u := h .client .URL (epLabels , nil )
10291029 q := addOptionalURLParams (u .Query (), opts )
10301030
@@ -1042,7 +1042,7 @@ func (h *httpAPI) LabelNames(ctx context.Context, matches []string, startTime, e
10421042 if err != nil {
10431043 return nil , w , err
10441044 }
1045- var labelNames [] string
1045+ var labelNames model. LabelNames
10461046 err = json .Unmarshal (body , & labelNames )
10471047 return labelNames , w , err
10481048}
0 commit comments