(minT, maxT, limit int64, blockIDs []ulid.ULID, matchers []storepb.LabelMatcher)
| 1110 | } |
| 1111 | |
| 1112 | func createLabelNamesRequest(minT, maxT, limit int64, blockIDs []ulid.ULID, matchers []storepb.LabelMatcher) (*storepb.LabelNamesRequest, error) { |
| 1113 | req := &storepb.LabelNamesRequest{ |
| 1114 | Start: minT, |
| 1115 | End: maxT, |
| 1116 | Limit: limit, |
| 1117 | Matchers: matchers, |
| 1118 | } |
| 1119 | |
| 1120 | // Selectively query only specific blocks. |
| 1121 | hints := &hintspb.LabelNamesRequestHints{ |
| 1122 | BlockMatchers: []storepb.LabelMatcher{ |
| 1123 | { |
| 1124 | Type: storepb.LabelMatcher_RE, |
| 1125 | Name: block.BlockIDLabel, |
| 1126 | Value: strings.Join(convertULIDsToString(blockIDs), "|"), |
| 1127 | }, |
| 1128 | }, |
| 1129 | } |
| 1130 | |
| 1131 | anyHints, err := types.MarshalAny(hints) |
| 1132 | if err != nil { |
| 1133 | return nil, errors.Wrapf(err, "failed to marshal label names request hints") |
| 1134 | } |
| 1135 | |
| 1136 | req.Hints = anyHints |
| 1137 | |
| 1138 | return req, nil |
| 1139 | } |
| 1140 | |
| 1141 | func createLabelValuesRequest(minT, maxT, limit int64, label string, blockIDs []ulid.ULID, matchers ...*labels.Matcher) (*storepb.LabelValuesRequest, error) { |
| 1142 | req := &storepb.LabelValuesRequest{ |
no test coverage detected