| 84 | } |
| 85 | |
| 86 | func (q *blockBaseQuerier) LabelNames(ctx context.Context, hints *storage.LabelHints, matchers ...*labels.Matcher) ([]string, annotations.Annotations, error) { |
| 87 | res, err := q.index.LabelNames(ctx, matchers...) |
| 88 | if err != nil { |
| 89 | return nil, nil, err |
| 90 | } |
| 91 | |
| 92 | if hints != nil && hints.Limit > 0 && len(res) > hints.Limit { |
| 93 | res = res[:hints.Limit] |
| 94 | } |
| 95 | |
| 96 | return res, nil, nil |
| 97 | } |
| 98 | |
| 99 | // SearchLabelNames implements storage.Searcher. |
| 100 | func (q *blockBaseQuerier) SearchLabelNames(ctx context.Context, hints *storage.SearchHints, matchers ...*labels.Matcher) storage.SearchResultSet { |