Add a LockerForImage() function that allocates and returns a file-based lock for an image record that we're using to hold a manifest list. Without some locking mechanism, two processes that wish to update a list at roughly the same time can't do so without risk of accidentally discarding one or the other set of changes. Multiple processes that merely want to read the list can already safely do so; only cases with multiple writers that need to bother with using this function. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> |
||
|---|---|---|
| .. | ||
| copy.go | ||
| manifests.go | ||
| manifests_test.go | ||