-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reuse the reader returned by FetchReference
FetchReference already returns a reader to the manifest content. However, content.Successors operates on a Fetcher. In order to funnel the already open reader into content.Successors, create a FetcherFunc that returns it. This saves one additional GET request. Before: GET /v2/repository/artifact/manifests/latest GET /v2/repository/artifact/manifests/sha256:341098d11767212bb4d148f3fe8e82fc2939c3be247b233291a62e39a594ed09 GET /v2/repository/artifact/blobs/sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 After: GET /v2/repository/artifact/manifests/latest GET /v2/repository/artifact/blobs/sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 Signed-off-by: Tom Wieczorek <[email protected]>
- Loading branch information
Showing
2 changed files
with
34 additions
and
7 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