Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Supply context to image fetch operation #713

Closed
squaremo opened this issue Aug 23, 2017 · 1 comment
Closed

Supply context to image fetch operation #713

squaremo opened this issue Aug 23, 2017 · 1 comment

Comments

@squaremo
Copy link
Member

squaremo commented Aug 23, 2017

We want to limit the amount of time we spend on attempting to fetch data for any one image repo, in the interest of fairness. Currently the operation uses a client, created by a factory, which gets a context with a deadline. But it is a better use of context.Context to supply the context to the operation, so the caller has the choice of deadline, timeout, or whatever.

@philwinder philwinder changed the title Use context.WithDeadline() for limiting repo fetches Make image fetch deadline user configurable and use deadline, not timeout Aug 24, 2017
@squaremo
Copy link
Member Author

I don't think this especially needs to be configurable by the user -- it'd be a dial with a rather indirect effect.

philwinder added a commit that referenced this issue Aug 24, 2017
- Use WithDeadline rather than WithTimeout
- Make deadline configurable

Fixes #713
philwinder added a commit that referenced this issue Aug 24, 2017
- Use WithDeadline rather than WithTimeout
- Make deadline configurable

Fixes #713
@squaremo squaremo changed the title Make image fetch deadline user configurable and use deadline, not timeout Supply context to image fetch operation Aug 24, 2017
@squaremo squaremo mentioned this issue Nov 27, 2017
6 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant