Fix missing loop (#1398)

* WithRoles variadic args

* Load Rules

* Timer => Ticker

* Add missing for loop in auth service

Co-authored-by: Ben Toogood <ben@micro.mu>
This commit is contained in:
ben-toogood 2020-03-24 14:16:57 +00:00 committed by GitHub
parent fd664f4392
commit 84b4eb5404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,8 +54,10 @@ func (s *svc) Init(opts ...auth.Option) {
// load rules periodically from the auth service
timer := time.NewTicker(time.Second * 30)
go func() {
s.loadRules()
<-timer.C
for {
s.loadRules()
<-timer.C
}
}()
}