Allow conditional fetching of manifests with the registry client.
Add a functional argument to pass a digest to (ManifestService).GetByTag().
If the digest matches an empty manifest and nil error are returned.
See 1bc740b0d5
for server implementation.
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
This commit is contained in:
parent
79a4ca2abe
commit
48a2010ac3
6 changed files with 116 additions and 24 deletions
|
@ -93,8 +93,8 @@ func (msl *manifestServiceListener) Put(sm *manifest.SignedManifest) error {
|
|||
return err
|
||||
}
|
||||
|
||||
func (msl *manifestServiceListener) GetByTag(tag string) (*manifest.SignedManifest, error) {
|
||||
sm, err := msl.ManifestService.GetByTag(tag)
|
||||
func (msl *manifestServiceListener) GetByTag(tag string, options ...distribution.ManifestServiceOption) (*manifest.SignedManifest, error) {
|
||||
sm, err := msl.ManifestService.GetByTag(tag, options...)
|
||||
if err == nil {
|
||||
if err := msl.parent.listener.ManifestPulled(msl.parent.Repository.Name(), sm); err != nil {
|
||||
logrus.Errorf("error dispatching manifest pull to listener: %v", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue