-
Notifications
You must be signed in to change notification settings - Fork 550
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e2e client support for cardinality (#6852)
* Forbid to import anything else from mimir Signed-off-by: Dimitar Dimitrov <[email protected]> * e2e client support for cardinality The necessary change for this was to add a dedicated package for cardinality API types, otherwise we end up importing the prometheus world and that may come with some side effects (comment) Signed-off-by: Dimitar Dimitrov <[email protected]> --------- Signed-off-by: Dimitar Dimitrov <[email protected]>
- Loading branch information
1 parent
5d0316a
commit 7e7e2c3
Showing
6 changed files
with
153 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
package api | ||
|
||
import "github.com/prometheus/prometheus/model/labels" | ||
|
||
type LabelValuesCardinalityResponse struct { | ||
SeriesCountTotal uint64 `json:"series_count_total"` | ||
Labels []LabelNamesCardinality `json:"labels"` | ||
} | ||
|
||
type LabelNamesCardinality struct { | ||
LabelName string `json:"label_name"` | ||
LabelValuesCount uint64 `json:"label_values_count"` | ||
SeriesCount uint64 `json:"series_count"` | ||
Cardinality []LabelValuesCardinality `json:"cardinality"` | ||
} | ||
|
||
type LabelValuesCardinality struct { | ||
LabelValue string `json:"label_value"` | ||
SeriesCount uint64 `json:"series_count"` | ||
} | ||
|
||
type LabelNamesCardinalityResponse struct { | ||
LabelValuesCountTotal int `json:"label_values_count_total"` | ||
LabelNamesCount int `json:"label_names_count"` | ||
Cardinality []*LabelNamesCardinalityItem `json:"cardinality"` | ||
} | ||
|
||
type LabelNamesCardinalityItem struct { | ||
LabelName string `json:"label_name"` | ||
LabelValuesCount int `json:"label_values_count"` | ||
} | ||
|
||
type ActiveSeriesResponse struct { | ||
Data []labels.Labels `json:"data"` | ||
} |
Oops, something went wrong.