Created
January 5, 2022 17:05
-
-
Save timebertt/4c50da55db48778cb936705ae6755de4 to your computer and use it in GitHub Desktop.
Patches with optimistic locking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// json merge patch + optimistic locking | |
patch := client.MergeFromWithOptions(shoot.DeepCopy(), client.MergeFromWithOptimisticLock{}) | |
// ... | |
// strategic merge patch + optimistic locking | |
patch = client.StrategicMergeFrom(shoot.DeepCopy(), client.MergeFromWithOptimisticLock{}) | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment