diff --git a/pkg/ruler/manager/compat.go b/pkg/ruler/manager/compat.go index c98dcb27a4e54..4772ed14cac73 100644 --- a/pkg/ruler/manager/compat.go +++ b/pkg/ruler/manager/compat.go @@ -98,7 +98,7 @@ func MemstoreTenantManager( OutageTolerance: cfg.OutageTolerance, ForGracePeriod: cfg.ForGracePeriod, ResendDelay: cfg.ResendDelay, - GroupLoader: groupLoader{}, + GroupLoader: GroupLoader{}, }) // initialize memStore, bound to the manager's alerting rules @@ -108,9 +108,9 @@ func MemstoreTenantManager( } } -type groupLoader struct{} +type GroupLoader struct{} -func (groupLoader) Parse(query string) (parser.Expr, error) { +func (GroupLoader) Parse(query string) (parser.Expr, error) { expr, err := logql.ParseExpr(query) if err != nil { return nil, err @@ -119,7 +119,7 @@ func (groupLoader) Parse(query string) (parser.Expr, error) { return exprAdapter{expr}, nil } -func (g groupLoader) Load(identifier string) (*rulefmt.RuleGroups, []error) { +func (g GroupLoader) Load(identifier string) (*rulefmt.RuleGroups, []error) { b, err := ioutil.ReadFile(identifier) if err != nil { return nil, []error{errors.Wrap(err, identifier)} @@ -131,7 +131,7 @@ func (g groupLoader) Load(identifier string) (*rulefmt.RuleGroups, []error) { return rgs, errs } -func (groupLoader) parseRules(content []byte) (*rulefmt.RuleGroups, []error) { +func (GroupLoader) parseRules(content []byte) (*rulefmt.RuleGroups, []error) { var ( groups rulefmt.RuleGroups errs []error diff --git a/pkg/ruler/manager/compat_test.go b/pkg/ruler/manager/compat_test.go index e5305723a84f2..04076d92208d9 100644 --- a/pkg/ruler/manager/compat_test.go +++ b/pkg/ruler/manager/compat_test.go @@ -222,7 +222,7 @@ groups: }, } { t.Run(tc.desc, func(t *testing.T) { - var loader groupLoader + var loader GroupLoader f, err := ioutil.TempFile(os.TempDir(), "rules") require.Nil(t, err) defer os.Remove(f.Name())