Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pkg/distributor/distributor.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ func (d *Distributor) ForReplicationSet(ctx context.Context, replicationSet ring

// LabelValuesForLabelName returns all of the label values that are associated with a given label name.
func (d *Distributor) LabelValuesForLabelName(ctx context.Context, labelName model.LabelName) ([]string, error) {
replicationSet, err := d.getIngestersForMetadata(ctx)
replicationSet, err := d.GetIngestersForMetadata(ctx)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -670,7 +670,7 @@ func (d *Distributor) LabelValuesForLabelName(ctx context.Context, labelName mod

// LabelNames returns all of the label names.
func (d *Distributor) LabelNames(ctx context.Context) ([]string, error) {
replicationSet, err := d.getIngestersForMetadata(ctx)
replicationSet, err := d.GetIngestersForMetadata(ctx)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -703,7 +703,7 @@ func (d *Distributor) LabelNames(ctx context.Context) ([]string, error) {

// MetricsForLabelMatchers gets the metrics that match said matchers
func (d *Distributor) MetricsForLabelMatchers(ctx context.Context, from, through model.Time, matchers ...*labels.Matcher) ([]metric.Metric, error) {
replicationSet, err := d.getIngestersForMetadata(ctx)
replicationSet, err := d.GetIngestersForMetadata(ctx)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -739,7 +739,7 @@ func (d *Distributor) MetricsForLabelMatchers(ctx context.Context, from, through

// MetricsMetadata returns all metric metadata of a user.
func (d *Distributor) MetricsMetadata(ctx context.Context) ([]scrape.MetricMetadata, error) {
replicationSet, err := d.getIngestersForMetadata(ctx)
replicationSet, err := d.GetIngestersForMetadata(ctx)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -779,7 +779,7 @@ func (d *Distributor) MetricsMetadata(ctx context.Context) ([]scrape.MetricMetad

// UserStats returns statistics about the current user.
func (d *Distributor) UserStats(ctx context.Context) (*UserStats, error) {
replicationSet, err := d.getIngestersForMetadata(ctx)
replicationSet, err := d.GetIngestersForMetadata(ctx)
if err != nil {
return nil, err
}
Expand Down
12 changes: 6 additions & 6 deletions pkg/distributor/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (d *Distributor) Query(ctx context.Context, from, to model.Time, matchers .
return err
}

replicationSet, err := d.getIngestersForQuery(ctx, matchers...)
replicationSet, err := d.GetIngestersForQuery(ctx, matchers...)
if err != nil {
return err
}
Expand All @@ -55,7 +55,7 @@ func (d *Distributor) QueryStream(ctx context.Context, from, to model.Time, matc
return err
}

replicationSet, err := d.getIngestersForQuery(ctx, matchers...)
replicationSet, err := d.GetIngestersForQuery(ctx, matchers...)
if err != nil {
return err
}
Expand All @@ -73,9 +73,9 @@ func (d *Distributor) QueryStream(ctx context.Context, from, to model.Time, matc
return result, err
}

// getIngestersForQuery returns a replication set including all ingesters that should be queried
// GetIngestersForQuery returns a replication set including all ingesters that should be queried
// to fetch series matching input label matchers.
func (d *Distributor) getIngestersForQuery(ctx context.Context, matchers ...*labels.Matcher) (ring.ReplicationSet, error) {
func (d *Distributor) GetIngestersForQuery(ctx context.Context, matchers ...*labels.Matcher) (ring.ReplicationSet, error) {
userID, err := user.ExtractOrgID(ctx)
if err != nil {
return ring.ReplicationSet{}, err
Expand Down Expand Up @@ -104,9 +104,9 @@ func (d *Distributor) getIngestersForQuery(ctx context.Context, matchers ...*lab
return d.ingestersRing.GetAll(ring.Read)
}

// getIngestersForMetadata returns a replication set including all ingesters that should be queried
// GetIngestersForMetadata returns a replication set including all ingesters that should be queried
// to fetch metadata (eg. label names/values or series).
func (d *Distributor) getIngestersForMetadata(ctx context.Context) (ring.ReplicationSet, error) {
func (d *Distributor) GetIngestersForMetadata(ctx context.Context) (ring.ReplicationSet, error) {
userID, err := user.ExtractOrgID(ctx)
if err != nil {
return ring.ReplicationSet{}, err
Expand Down