Break down type dependencies
Each type no longer requires holding a reference to repository. Added implementation for signatures get. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
parent
8db2145b81
commit
b4972a6bab
2 changed files with 32 additions and 16 deletions
|
@ -14,8 +14,8 @@ import (
|
|||
)
|
||||
|
||||
type httpBlobUpload struct {
|
||||
repo distribution.Repository
|
||||
client *http.Client
|
||||
statter distribution.BlobStatter
|
||||
client *http.Client
|
||||
|
||||
uuid string
|
||||
startedAt time.Time
|
||||
|
@ -146,7 +146,7 @@ func (hbu *httpBlobUpload) Commit(ctx context.Context, desc distribution.Descrip
|
|||
return distribution.Descriptor{}, hbu.handleErrorResponse(resp)
|
||||
}
|
||||
|
||||
return hbu.repo.Blobs(ctx).Stat(ctx, desc.Digest)
|
||||
return hbu.statter.Stat(ctx, desc.Digest)
|
||||
}
|
||||
|
||||
func (hbu *httpBlobUpload) Cancel(ctx context.Context) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue