MCPcopy Create free account
hub / github.com/TalkingData/owl / Run

Method Run

controller/cache/cache.go:231–244  ·  view source on GitHub ↗
(c *cache)

Source from the content-addressed store, hash-verified

229}
230
231func (j *janitor) Run(c *cache) {
232 j.stop = make(chan bool)
233 ticker := time.NewTicker(j.Interval)
234 for {
235 select {
236 case <-ticker.C:
237 //delete expired
238 c.DeleteExpired()
239 case <-j.stop:
240 ticker.Stop()
241 return
242 }
243 }
244}
245
246func stopJanitor(c *Cache) {
247 c.janitor.stop <- true

Callers 5

runJanitorFunction · 0.95
startHttpServerMethod · 0.80
InitServerFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 1

DeleteExpiredMethod · 0.80

Tested by

no test coverage detected