-
Notifications
You must be signed in to change notification settings - Fork 545
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add remote.Reuse for Pusher/Puller (#1672)
* code organization: split fetcher from descriptor * Refactor everything to go through Puller * crane: use puller/pusher in copy to drop legacy This package was only used to copy schema 1 images, which we don't need anymore. * Add remote.Reuse for Pusher/Puller This is a big change, but it helps callers out a lot. The Pusher/Puller interfaces allow us to deduplicate a bunch of work (largely, ping an auth), but they only work if you actually use them. It's a huge pain to migrate callers from remote.{Image,Index,...} interfaces to start using Pusher/Puller because the remote functions can be called from anywhere, which means plumbing pushers and pullers around the entire callgraph, which is super painful. Happily, though, most callers already plumb remote.Options around the callgraph so that they can set their options in one place and have them be consistent throughout their application. This change takes advantage of that fact by introducing remote.Reuse, which takes either a Puller or a Pusher, and calls equivalent methods on said pusher/puller whenever you pass remote.Reuse into a remote function. The end result is that we can get almost all of the performance wins of using Puller/Pusher directly with a 3 line change to most applications rather than refactoring everything. * Address review feedback
- Loading branch information
1 parent
58bd35b
commit 005bb71
Showing
22 changed files
with
697 additions
and
1,105 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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.