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:
@@ -37,6 +37,9 @@ type Namespace interface {
|
||||
Repository(ctx context.Context, name string) (Repository, error)
|
||||
}
|
||||
|
||||
// ManifestServiceOption is a function argument for Manifest Service methods
|
||||
type ManifestServiceOption func(ManifestService) error
|
||||
|
||||
// Repository is a named collection of manifests and layers.
|
||||
type Repository interface {
|
||||
// Name returns the name of the repository.
|
||||
@@ -84,7 +87,7 @@ type ManifestService interface {
|
||||
ExistsByTag(tag string) (bool, error)
|
||||
|
||||
// GetByTag retrieves the named manifest, if it exists.
|
||||
GetByTag(tag string) (*manifest.SignedManifest, error)
|
||||
GetByTag(tag string, options ...ManifestServiceOption) (*manifest.SignedManifest, error)
|
||||
|
||||
// TODO(stevvooe): There are several changes that need to be done to this
|
||||
// interface:
|
||||
|
Reference in New Issue
Block a user