Rename QueryforStateSeries to QueryForStateSeries

Signed-off-by: gotjosh <josue.abreu@gmail.com>
This commit is contained in:
gotjosh 2024-04-30 12:19:18 +01:00
parent 151f6e0ed6
commit ccfafae36d
No known key found for this signature in database
GPG key ID: A6E1DDE38FF3C74E
3 changed files with 4 additions and 4 deletions

View file

@ -268,8 +268,8 @@ func (r *AlertingRule) forStateSample(alert *Alert, ts time.Time, v float64) pro
return s
}
// QueryforStateSeries returns the series for ALERTS_FOR_STATE of the alert rule.
func (r *AlertingRule) QueryforStateSeries(ctx context.Context, q storage.Querier) (storage.SeriesSet, error) {
// QueryForStateSeries returns the series for ALERTS_FOR_STATE of the alert rule.
func (r *AlertingRule) QueryForStateSeries(ctx context.Context, q storage.Querier) (storage.SeriesSet, error) {
// We use a sample to ease the building of matchers.
// Don't provide an alert as we want matchers that match all series for the alert rule.
smpl := r.forStateSample(nil, time.Now(), 0)

View file

@ -716,7 +716,7 @@ func TestQueryForStateSeries(t *testing.T) {
matchersCount++
})
seriesSet, err := rule.QueryforStateSeries(context.Background(), querier)
seriesSet, err := rule.QueryForStateSeries(context.Background(), querier)
var series storage.Series
for seriesSet.Next() {

View file

@ -664,7 +664,7 @@ func (g *Group) RestoreForState(ts time.Time) {
continue
}
sset, err := alertRule.QueryforStateSeries(g.opts.Context, q)
sset, err := alertRule.QueryForStateSeries(g.opts.Context, q)
if err != nil {
level.Error(g.logger).Log(
"msg", "Failed to restore 'for' state",