@@ -109,7 +109,6 @@ func marshalPointJSON(ptr unsafe.Pointer, stream *json.Stream) {
109
109
110
110
stream .WriteRaw (`"` )
111
111
stream .WriteArrayEnd ()
112
-
113
112
}
114
113
115
114
func marshalPointJSONIsEmpty (ptr unsafe.Pointer ) bool {
@@ -230,25 +229,25 @@ type API interface {
230
229
// Config returns the current Prometheus configuration.
231
230
Config (ctx context.Context ) (ConfigResult , error )
232
231
// DeleteSeries deletes data for a selection of series in a time range.
233
- DeleteSeries (ctx context.Context , matches []string , startTime time. Time , endTime time.Time ) error
232
+ DeleteSeries (ctx context.Context , matches []string , startTime , endTime time.Time ) error
234
233
// Flags returns the flag values that Prometheus was launched with.
235
234
Flags (ctx context.Context ) (FlagsResult , error )
236
235
// LabelNames returns the unique label names present in the block in sorted order by given time range and matchers.
237
- LabelNames (ctx context.Context , matches []string , startTime time. Time , endTime time.Time ) ([]string , Warnings , error )
236
+ LabelNames (ctx context.Context , matches []string , startTime , endTime time.Time ) ([]string , Warnings , error )
238
237
// LabelValues performs a query for the values of the given label, time range and matchers.
239
- LabelValues (ctx context.Context , label string , matches []string , startTime time. Time , endTime time.Time ) (model.LabelValues , Warnings , error )
238
+ LabelValues (ctx context.Context , label string , matches []string , startTime , endTime time.Time ) (model.LabelValues , Warnings , error )
240
239
// Query performs a query for the given time.
241
240
Query (ctx context.Context , query string , ts time.Time , opts ... Option ) (model.Value , Warnings , error )
242
241
// QueryRange performs a query for the given range.
243
242
QueryRange (ctx context.Context , query string , r Range , opts ... Option ) (model.Value , Warnings , error )
244
243
// QueryExemplars performs a query for exemplars by the given query and time range.
245
- QueryExemplars (ctx context.Context , query string , startTime time. Time , endTime time.Time ) ([]ExemplarQueryResult , error )
244
+ QueryExemplars (ctx context.Context , query string , startTime , endTime time.Time ) ([]ExemplarQueryResult , error )
246
245
// Buildinfo returns various build information properties about the Prometheus server
247
246
Buildinfo (ctx context.Context ) (BuildinfoResult , error )
248
247
// Runtimeinfo returns the various runtime information properties about the Prometheus server.
249
248
Runtimeinfo (ctx context.Context ) (RuntimeinfoResult , error )
250
249
// Series finds series by label matchers.
251
- Series (ctx context.Context , matches []string , startTime time. Time , endTime time.Time ) ([]model.LabelSet , Warnings , error )
250
+ Series (ctx context.Context , matches []string , startTime , endTime time.Time ) ([]model.LabelSet , Warnings , error )
252
251
// Snapshot creates a snapshot of all current data into snapshots/<datetime>-<rand>
253
252
// under the TSDB's data directory and returns the directory as response.
254
253
Snapshot (ctx context.Context , skipHead bool ) (SnapshotResult , error )
@@ -257,9 +256,9 @@ type API interface {
257
256
// Targets returns an overview of the current state of the Prometheus target discovery.
258
257
Targets (ctx context.Context ) (TargetsResult , error )
259
258
// TargetsMetadata returns metadata about metrics currently scraped by the target.
260
- TargetsMetadata (ctx context.Context , matchTarget string , metric string , limit string ) ([]MetricMetadata , error )
259
+ TargetsMetadata (ctx context.Context , matchTarget , metric , limit string ) ([]MetricMetadata , error )
261
260
// Metadata returns metadata about metrics currently scraped by the metric name.
262
- Metadata (ctx context.Context , metric string , limit string ) (map [string ][]Metadata , error )
261
+ Metadata (ctx context.Context , metric , limit string ) (map [string ][]Metadata , error )
263
262
// TSDB returns the cardinality statistics.
264
263
TSDB (ctx context.Context ) (TSDBResult , error )
265
264
// WalReplay returns the current replay status of the wal.
@@ -699,7 +698,7 @@ func (h *httpAPI) Config(ctx context.Context) (ConfigResult, error) {
699
698
return res , json .Unmarshal (body , & res )
700
699
}
701
700
702
- func (h * httpAPI ) DeleteSeries (ctx context.Context , matches []string , startTime time. Time , endTime time.Time ) error {
701
+ func (h * httpAPI ) DeleteSeries (ctx context.Context , matches []string , startTime , endTime time.Time ) error {
703
702
u := h .client .URL (epDeleteSeries , nil )
704
703
q := u .Query ()
705
704
@@ -772,7 +771,7 @@ func (h *httpAPI) Runtimeinfo(ctx context.Context) (RuntimeinfoResult, error) {
772
771
return res , json .Unmarshal (body , & res )
773
772
}
774
773
775
- func (h * httpAPI ) LabelNames (ctx context.Context , matches []string , startTime time. Time , endTime time.Time ) ([]string , Warnings , error ) {
774
+ func (h * httpAPI ) LabelNames (ctx context.Context , matches []string , startTime , endTime time.Time ) ([]string , Warnings , error ) {
776
775
u := h .client .URL (epLabels , nil )
777
776
q := u .Query ()
778
777
q .Set ("start" , formatTime (startTime ))
@@ -795,7 +794,7 @@ func (h *httpAPI) LabelNames(ctx context.Context, matches []string, startTime ti
795
794
return labelNames , w , json .Unmarshal (body , & labelNames )
796
795
}
797
796
798
- func (h * httpAPI ) LabelValues (ctx context.Context , label string , matches []string , startTime time. Time , endTime time.Time ) (model.LabelValues , Warnings , error ) {
797
+ func (h * httpAPI ) LabelValues (ctx context.Context , label string , matches []string , startTime , endTime time.Time ) (model.LabelValues , Warnings , error ) {
799
798
u := h .client .URL (epLabelValues , map [string ]string {"name" : label })
800
799
q := u .Query ()
801
800
q .Set ("start" , formatTime (startTime ))
@@ -833,7 +832,6 @@ func WithTimeout(timeout time.Duration) Option {
833
832
}
834
833
835
834
func (h * httpAPI ) Query (ctx context.Context , query string , ts time.Time , opts ... Option ) (model.Value , Warnings , error ) {
836
-
837
835
u := h .client .URL (epQuery , nil )
838
836
q := u .Query ()
839
837
@@ -890,7 +888,7 @@ func (h *httpAPI) QueryRange(ctx context.Context, query string, r Range, opts ..
890
888
return model .Value (qres .v ), warnings , json .Unmarshal (body , & qres )
891
889
}
892
890
893
- func (h * httpAPI ) Series (ctx context.Context , matches []string , startTime time. Time , endTime time.Time ) ([]model.LabelSet , Warnings , error ) {
891
+ func (h * httpAPI ) Series (ctx context.Context , matches []string , startTime , endTime time.Time ) ([]model.LabelSet , Warnings , error ) {
894
892
u := h .client .URL (epSeries , nil )
895
893
q := u .Query ()
896
894
@@ -973,7 +971,7 @@ func (h *httpAPI) Targets(ctx context.Context) (TargetsResult, error) {
973
971
return res , json .Unmarshal (body , & res )
974
972
}
975
973
976
- func (h * httpAPI ) TargetsMetadata (ctx context.Context , matchTarget string , metric string , limit string ) ([]MetricMetadata , error ) {
974
+ func (h * httpAPI ) TargetsMetadata (ctx context.Context , matchTarget , metric , limit string ) ([]MetricMetadata , error ) {
977
975
u := h .client .URL (epTargetsMetadata , nil )
978
976
q := u .Query ()
979
977
@@ -997,7 +995,7 @@ func (h *httpAPI) TargetsMetadata(ctx context.Context, matchTarget string, metri
997
995
return res , json .Unmarshal (body , & res )
998
996
}
999
997
1000
- func (h * httpAPI ) Metadata (ctx context.Context , metric string , limit string ) (map [string ][]Metadata , error ) {
998
+ func (h * httpAPI ) Metadata (ctx context.Context , metric , limit string ) (map [string ][]Metadata , error ) {
1001
999
u := h .client .URL (epMetadata , nil )
1002
1000
q := u .Query ()
1003
1001
@@ -1054,7 +1052,7 @@ func (h *httpAPI) WalReplay(ctx context.Context) (WalReplayStatus, error) {
1054
1052
return res , json .Unmarshal (body , & res )
1055
1053
}
1056
1054
1057
- func (h * httpAPI ) QueryExemplars (ctx context.Context , query string , startTime time. Time , endTime time.Time ) ([]ExemplarQueryResult , error ) {
1055
+ func (h * httpAPI ) QueryExemplars (ctx context.Context , query string , startTime , endTime time.Time ) ([]ExemplarQueryResult , error ) {
1058
1056
u := h .client .URL (epQueryExemplars , nil )
1059
1057
q := u .Query ()
1060
1058
@@ -1162,7 +1160,6 @@ func (h *apiClientImpl) Do(ctx context.Context, req *http.Request) (*http.Respon
1162
1160
}
1163
1161
1164
1162
return resp , []byte (result .Data ), result .Warnings , err
1165
-
1166
1163
}
1167
1164
1168
1165
// DoGetFallback will attempt to do the request as-is, and on a 405 or 501 it
0 commit comments