MCPcopy Create free account
hub / github.com/SenseUnit/dumbproxy / reloadLoop

Method reloadLoop

auth/cert.go:165–178  ·  view source on GitHub ↗
(interval time.Duration)

Source from the content-addressed store, hash-verified

163}
164
165func (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
181func formatSerial(serial *big.Int) string {

Callers 1

NewCertAuthFunction · 0.95

Calls 2

reloadMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected