Start starts watching the directory for CRL files and updates the provider accordingly.
()
| 148 | |
| 149 | // Start starts watching the directory for CRL files and updates the provider accordingly. |
| 150 | func (p *FileWatcherCRLProvider) run() { |
| 151 | defer close(p.done) |
| 152 | ticker := time.NewTicker(p.opts.RefreshDuration) |
| 153 | defer ticker.Stop() |
| 154 | |
| 155 | for { |
| 156 | select { |
| 157 | case <-p.stop: |
| 158 | grpclogLogger.Infof("Scanning of CRLDirectory %v stopped", p.opts.CRLDirectory) |
| 159 | return |
| 160 | case <-ticker.C: |
| 161 | p.scanCRLDirectory() |
| 162 | } |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | // Close waits till the background refresh of CRLDirectory of |
| 167 | // FileWatcherCRLProvider is done and then stops it. |
no test coverage detected