-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Right now, the snapshotter maintains a single HTTP client for fetching SOCI artifacts and `n` clients for every layer in an image (used to fetch spans/layers). Every client maintains its own credential cache, meaning we have to re-authenticate an extra `n` times everytime we need to fetch/refresh credentials. This change unifies both client creation and authentication by creating a global `AuthClient` type that contains a single `http.Client` and credential cache (one `AuthClient` per process). The `AuthClient` is responsible for authenticating with registries and sending the request out via it's inner `retryable` HTTP client. It also includes some smaller fixes like ensuring that we store the final blob URL instead of the original base URL in our `httpFetcher`. Signed-off-by: Yasin Turan <[email protected]>
- Loading branch information
Showing
27 changed files
with
1,287 additions
and
709 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
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
Oops, something went wrong.