Merge pull request #699 from RichardScothern/client-manifest-etags-clean

Allow conditional fetching of manifests with the registry client.
This commit is contained in:
Derek McGowan 2015-07-14 17:29:59 -07:00
commit c7d538aefa
3 changed files with 83 additions and 18 deletions

View file

@ -73,7 +73,14 @@ func (ms *manifestStore) ExistsByTag(tag string) (bool, error) {
return ms.tagStore.exists(tag)
}
func (ms *manifestStore) GetByTag(tag string) (*manifest.SignedManifest, error) {
func (ms *manifestStore) GetByTag(tag string, options ...distribution.ManifestServiceOption) (*manifest.SignedManifest, error) {
for _, option := range options {
err := option(ms)
if err != nil {
return nil, err
}
}
context.GetLogger(ms.ctx).Debug("(*manifestStore).GetByTag")
dgst, err := ms.tagStore.resolve(tag)
if err != nil {