-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip pulling layers reusable from additional layer store
Signed-off-by: Kohei Tokunaga <[email protected]>
- Loading branch information
Showing
3 changed files
with
98 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package types | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/containers/image/v5/types" | ||
"github.com/containers/image/v5/docker/reference" | ||
) | ||
|
||
// ImageDestinationReusableWithRef is a variant of ImageDestination that tries to reuse blob contents with | ||
// taking the image reference into consideration. One of the use-cases of this is "additional layer store" | ||
// where some backends require the image reference to be passed. | ||
type ImageDestinationReusableWithRef interface { | ||
types.ImageDestination | ||
|
||
// TryReusingBlobWithRef checks whether the destination can efficiently reuse a blob, and if so, applies it to the current destination. | ||
// This allows the destination to search the blob contents with taking the image reference into consideration. | ||
TryReusingBlobWithSrcRef(ctx context.Context, blobinfo types.BlobInfo, srcRef reference.Named, cache types.BlobInfoCache, canSubstitute bool) (bool, types.BlobInfo, error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters