@@ -122,6 +122,10 @@ func (q *MockQuerier) LabelValues(string, ...*labels.Matcher) ([]string, Warning
122122 return nil , nil , nil
123123}
124124
125+ func (q * MockQuerier ) LabelValuesStream (string , ... * labels.Matcher ) (LabelValuesSet , error ) {
126+ return nil , nil
127+ }
128+
125129func (q * MockQuerier ) LabelNames (... * labels.Matcher ) ([]string , Warnings , error ) {
126130 return nil , nil , nil
127131}
@@ -159,6 +163,12 @@ type LabelQuerier interface {
159163 // to label values of metrics matching the matchers.
160164 LabelValues (name string , matchers ... * labels.Matcher ) ([]string , Warnings , error )
161165
166+ // LabelValuesSet returns an iterator over all potential values for a label name.
167+ // It is not safe to use the strings beyond the lifetime of the querier.
168+ // If matchers are specified the returned result set is reduced
169+ // to label values of metrics matching the matchers.
170+ LabelValuesSet (name string , matchers ... * labels.Matcher ) (LabelValuesSet , error )
171+
162172 // LabelNames returns all the unique label names present in the block in sorted order.
163173 // If matchers are specified the returned result set is reduced
164174 // to label names of metrics matching the matchers.
@@ -444,3 +454,16 @@ type ChunkIterable interface {
444454}
445455
446456type Warnings []error
457+
458+ // LabelValuesSet contains a set of label values.
459+ type LabelValuesSet interface {
460+ Next () bool
461+ // At returns a label value.
462+ At () string
463+ // The error that iteration as failed with.
464+ // When an error occurs, set cannot continue to iterate.
465+ Err () error
466+ // A collection of warnings for the whole set.
467+ // Warnings could be return even iteration has not failed with error.
468+ Warnings () Warnings
469+ }
0 commit comments