MCPcopy Create free account
hub / github.com/cloudtty/cloudtty / enqueue

Method enqueue

pkg/workerpool/worker_pool.go:112–118  ·  view source on GitHub ↗
(obj interface{})

Source from the content-addressed store, hash-verified

110}
111
112func (w *WorkerPool) enqueue(obj interface{}) {
113 pod := obj.(*corev1.Pod)
114 if isIdleWorker(pod) {
115 key, _ := cache.MetaNamespaceKeyFunc(obj)
116 w.queue.Add(key)
117 }
118}
119
120func (w *WorkerPool) Run(stopCh <-chan struct{}) {
121 if !cache.WaitForCacheSync(stopCh, w.podInformer.HasSynced) {

Callers 1

NewFunction · 0.95

Calls 2

isIdleWorkerFunction · 0.85
AddMethod · 0.65

Tested by

no test coverage detected