MCPcopy
hub / github.com/cilium/cilium / start

Method start

pkg/allocator/cache.go:260–275  ·  view source on GitHub ↗

start requests a LIST operation from the kvstore and starts watching the prefix in a go subroutine.

()

Source from the content-addressed store, hash-verified

258// start requests a LIST operation from the kvstore and starts watching the
259// prefix in a go subroutine.
260func (c *cache) start() waitChan {
261 c.listDone = make(waitChan)
262
263 c.mutex.Lock()
264
265 // start with a fresh nextCache
266 c.nextCache = idMap{}
267 c.nextKeyCache = keyMap{}
268 c.mutex.Unlock()
269
270 c.stopWatchWg.Go(func() {
271 c.allocator.backend.ListAndWatch(c.ctx, c)
272 })
273
274 return c.listDone
275}
276
277func (c *cache) stop() {
278 c.cancel()

Callers 2

resolveMethod · 0.45
serveFunction · 0.45

Calls 3

LockMethod · 0.65
UnlockMethod · 0.65
ListAndWatchMethod · 0.65

Tested by

no test coverage detected