-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* introduce bufferedReader The idea of bufferedReader is to be a staging area where we can download request bodies to. It blocks Read() calls until the whole request has been downloaded. The key thing this enables us to do is to get rid of the errGroup.Wait() call, because the readers that we return are waiting for each chunk to be ready and we no longer need to wait until the whole file has been downloaded to return from Fetch(). * respect MaxConcurrency within a single BufferMode object This means that a single BufferMode instance cannot ever exceed MaxConcurrency concurrent requests. * introduce workQueue and chanMultiReader We want to be able to return early so that a consumer can start consuming ASAP, even if we block on making new requests before we get to the last chunk. This lets us do that. * add a per-file concurrency limit * make max-concurrent-files configurable
- Loading branch information
1 parent
c336304
commit f9b008e
Showing
14 changed files
with
404 additions
and
264 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
Oops, something went wrong.