(ctx context.Context)
| 76 | } |
| 77 | |
| 78 | func (l *authAutoRefreshLoop) worker(ctx context.Context) { |
| 79 | for { |
| 80 | select { |
| 81 | case <-ctx.Done(): |
| 82 | return |
| 83 | case authID := <-l.jobs: |
| 84 | if authID == "" { |
| 85 | continue |
| 86 | } |
| 87 | l.manager.refreshAuth(ctx, authID) |
| 88 | l.queueReschedule(authID) |
| 89 | } |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | func (l *authAutoRefreshLoop) rebuild(now time.Time) { |
| 94 | type entry struct { |
no test coverage detected