Browse Source

Add tracking to elided layer pulls.

Signed-off-by: Matt Moore <mattmoor@google.com>
Matt Moore 8 years ago
parent
commit
d5482089bf
1 changed files with 5 additions and 0 deletions
  1. 5 0
      distribution/xfer/download.go

+ 5 - 0
distribution/xfer/download.go

@@ -126,6 +126,11 @@ func (ldm *LayerDownloadManager) Download(ctx context.Context, initialRootFS ima
 					topLayer = l
 					missingLayer = false
 					rootFS.Append(diffID)
+					// Register this repository as a source of this layer.
+					withRegistered, hasRegistered := descriptor.(DownloadDescriptorWithRegistered)
+					if hasRegistered {
+						withRegistered.Registered(diffID)
+					}
 					continue
 				}
 			}