Decouple storage components by redefining dependencies as interfaces instead of concrete types

Signed-off-by: Richard Scothern <richard.scothern@docker.com>
This commit is contained in:
Richard Scothern
2016-07-20 15:09:11 -07:00
parent 4e17ab5d31
commit 2a5fcacdf0
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
}