-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #536 from mtrmac/blob-info-caching
Blob info caching + mount/reuse
- Loading branch information
Showing
42 changed files
with
1,874 additions
and
278 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
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
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,23 @@ | ||
package docker | ||
|
||
import ( | ||
"github.com/containers/image/docker/reference" | ||
"github.com/containers/image/types" | ||
) | ||
|
||
// bicTransportScope returns a BICTransportScope appropriate for ref. | ||
func bicTransportScope(ref dockerReference) types.BICTransportScope { | ||
// Blobs can be reused across the whole registry. | ||
return types.BICTransportScope{Opaque: reference.Domain(ref.ref)} | ||
} | ||
|
||
// newBICLocationReference returns a BICLocationReference appropriate for ref. | ||
func newBICLocationReference(ref dockerReference) types.BICLocationReference { | ||
// Blobs are scoped to repositories (the tag/digest are not necessary to reuse a blob). | ||
return types.BICLocationReference{Opaque: ref.ref.Name()} | ||
} | ||
|
||
// parseBICLocationReference returns a repository for encoded lr. | ||
func parseBICLocationReference(lr types.BICLocationReference) (reference.Named, error) { | ||
return reference.ParseNormalizedNamed(lr.Opaque) | ||
} |
Oops, something went wrong.