cancelIfRunning cancels a running invocation for the resource. It does nothing if no invocation is running for the resource. It must be called while c.mu is held.
(n *runtimev1.ResourceName)
| 1545 | // It does nothing if no invocation is running for the resource. |
| 1546 | // It must be called while c.mu is held. |
| 1547 | func (c *Controller) cancelIfRunning(n *runtimev1.ResourceName) { |
| 1548 | inv, ok := c.invocations[nameStr(n)] |
| 1549 | if ok { |
| 1550 | inv.cancel(false) |
| 1551 | } |
| 1552 | } |
| 1553 | |
| 1554 | // invocation represents a running reconciler invocation for a specific resource. |
| 1555 | type invocation struct { |
no test coverage detected