(interval time.Duration)
| 163 | } |
| 164 | |
| 165 | func (auth *CertAuth) reloadLoop(interval time.Duration) { |
| 166 | ticker := time.NewTicker(interval) |
| 167 | defer ticker.Stop() |
| 168 | for { |
| 169 | select { |
| 170 | case <-auth.stopChan: |
| 171 | return |
| 172 | case <-ticker.C: |
| 173 | if err := auth.reload(); err != nil { |
| 174 | auth.logger.Error("reload failed: %v", err) |
| 175 | } |
| 176 | } |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | // formatSerial from https://codereview.stackexchange.com/a/165708 |
| 181 | func formatSerial(serial *big.Int) string { |
no test coverage detected