(ctx context.Context)
| 121 | } |
| 122 | |
| 123 | func (i *FileWatcherInterceptor) run(ctx context.Context) { |
| 124 | ticker := time.NewTicker(i.refreshDuration) |
| 125 | for { |
| 126 | if err := i.updateInternalInterceptor(); err != nil { |
| 127 | logger.Warningf("authorization policy reload status err: %v", err) |
| 128 | } |
| 129 | select { |
| 130 | case <-ctx.Done(): |
| 131 | ticker.Stop() |
| 132 | return |
| 133 | case <-ticker.C: |
| 134 | } |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | // updateInternalInterceptor checks if the policy file that is watching has changed, |
| 139 | // and if so, updates the internalInterceptor with the policy. Unlike the |
no test coverage detected