MCPcopy
hub / github.com/kubernetes/client-go / copyDeltas

Function copyDeltas

tools/cache/delta_fifo.go:642–646  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
642func 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

Callers 1

GetByKeyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected