copyDeltas returns a shallow copy of d; that is, it copies the slice but not the objects in the slice. This allows Get/List to return an object that we know won't be clobbered by a subsequent modifications.
(d Deltas)
| 640 | // the objects in the slice. This allows Get/List to return an object that we |
| 641 | // know won't be clobbered by a subsequent modifications. |
| 642 | func copyDeltas(d Deltas) Deltas { |
| 643 | d2 := make(Deltas, len(d)) |
| 644 | copy(d2, d) |
| 645 | return d2 |
| 646 | } |
| 647 | |
| 648 | // DeletedFinalStateUnknown is placed into a DeltaFIFO in the case where |
| 649 | // an object was deleted but the watch deletion event was missed. In this |