Merge pull request #1858 from RichardScothern/decouple

Decouple storage components by redefining dependencies as interfaces
This commit is contained in:
Aaron Lehmann 2016-07-21 11:12:05 -07:00 committed by GitHub
commit f56b143dc8
4 changed files with 15 additions and 27 deletions

View file

@ -21,8 +21,8 @@ var (
//schema2ManifestHandler is a ManifestHandler that covers schema2 manifests.
type schema2ManifestHandler struct {
repository *repository
blobStore *linkedBlobStore
repository distribution.Repository
blobStore distribution.BlobStore
ctx context.Context
}
@ -62,11 +62,6 @@ func (ms *schema2ManifestHandler) Put(ctx context.Context, manifest distribution
return "", err
}
// Link the revision into the repository.
if err := ms.blobStore.linkBlob(ctx, revision); err != nil {
return "", err
}
return revision.Digest, nil
}