MCPcopy Create free account
hub / github.com/cortexproject/cortex / updateLoop

Method updateLoop

pkg/chunk/cache/memcached_client.go:217–232  ·  view source on GitHub ↗
(updateInterval time.Duration)

Source from the content-addressed store, hash-verified

215}
216
217func (c *memcachedClient) updateLoop(updateInterval time.Duration) {
218 defer c.wait.Done()
219 ticker := time.NewTicker(updateInterval)
220 for {
221 select {
222 case <-ticker.C:
223 err := c.updateMemcacheServers()
224 if err != nil {
225 level.Warn(c.logger).Log("msg", "error updating memcache servers", "err", err)
226 }
227 case <-c.quit:
228 ticker.Stop()
229 return
230 }
231 }
232}
233
234// updateMemcacheServers sets a memcache server list from SRV records. SRV
235// priority & weight are ignored.

Callers 1

NewMemcachedClientFunction · 0.95

Calls 4

updateMemcacheServersMethod · 0.95
DoneMethod · 0.80
StopMethod · 0.65
LogMethod · 0.45

Tested by

no test coverage detected