Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support context? #268

Open
qianxiansheng90 opened this issue Aug 11, 2022 · 1 comment
Open

support context? #268

qianxiansheng90 opened this issue Aug 11, 2022 · 1 comment
Labels
accepted Accepted issue feature A feature request

Comments

@qianxiansheng90
Copy link

as title, will Stor 、 Retr can support context?

@qianxiansheng90 qianxiansheng90 added the defect The code does not work as intended label Aug 11, 2022
@jlaffaye jlaffaye added accepted Accepted issue feature A feature request and removed defect The code does not work as intended labels Aug 16, 2022
@tgulacsi
Copy link
Contributor

Though Response has SetDeadline, Stor has nothing, and every net-calling method should support Context.
But the underlying net.Conn does not support Context. It can serve timeouts with Set(Read,Write)Deadline, but cancellation is unsolved.
So we could emulate half of Context, with complex code.

The other problem is the API: duplicate all methods with Timeout suffix or add a WithTimeout option to every method, or?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Accepted issue feature A feature request
Projects
None yet
Development

No branches or pull requests

3 participants