Skip to content

Commit

Permalink
exposes rule group validation fn (#2662)
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-d committed Sep 23, 2020
1 parent 21d3e69 commit 5729d88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/ruler/manager/compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ type MultiTenantManager struct {

// ValidateRuleGroup validates a rulegroup
func (m *MultiTenantManager) ValidateRuleGroup(grp rulefmt.RuleGroup) []error {
return validateGroups(grp)
return ValidateGroups(grp)
}

func MemstoreTenantManager(
Expand Down Expand Up @@ -163,10 +163,10 @@ func (GroupLoader) parseRules(content []byte) (*rulefmt.RuleGroups, []error) {
return nil, errs
}

return &groups, validateGroups(groups.Groups...)
return &groups, ValidateGroups(groups.Groups...)
}

func validateGroups(grps ...rulefmt.RuleGroup) (errs []error) {
func ValidateGroups(grps ...rulefmt.RuleGroup) (errs []error) {
set := map[string]struct{}{}

for i, g := range grps {
Expand Down

0 comments on commit 5729d88

Please sign in to comment.