MCPcopy Index your code
hub / github.com/cloudflare/cloudflared / refreshLoop

Method refreshLoop

features/selector.go:157–170  ·  view source on GitHub ↗
(ctx context.Context, refreshFreq time.Duration)

Source from the content-addressed store, hash-verified

155}
156
157func (fs *featureSelector) refreshLoop(ctx context.Context, refreshFreq time.Duration) {
158 ticker := time.NewTicker(refreshFreq)
159 for {
160 select {
161 case <-ctx.Done():
162 return
163 case <-ticker.C:
164 err := fs.refresh(ctx)
165 if err != nil {
166 fs.logger.Err(err).Msg("Failed to refresh feature selector")
167 }
168 }
169 }
170}
171
172// resolver represents an object that can look up featuresRecord
173type resolver interface {

Callers 1

newFeatureSelectorFunction · 0.95

Calls 2

refreshMethod · 0.95
ErrMethod · 0.45

Tested by

no test coverage detected