(sg interface{}, todo task)
| 101 | } |
| 102 | |
| 103 | func (c *Controller) enqueue(sg interface{}, todo task) { |
| 104 | acc, _ := meta.Accessor(sg) |
| 105 | name := acc.GetName() |
| 106 | namespace := acc.GetNamespace() |
| 107 | w := workItem{ |
| 108 | name: name, |
| 109 | namespace: namespace, |
| 110 | task: todo, |
| 111 | snapshotGroup: sg.(*snapshotgroup.SnapshotGroup), |
| 112 | } |
| 113 | c.workqueue.Add(w) |
| 114 | } |
| 115 | |
| 116 | func (c *Controller) runWorker() { |
| 117 | for c.processNextWorkItem() { |
no outgoing calls