Closed dbolduc closed 2 years ago
This looks like a duplicate of #7198, I will let @devjgm and @dbolduc decide which one should be closed.
Whoops. I did not do my homework before writing up this issue. I am going to close this one, but copy the text over to the original issue as a comment.
Overview
This would offer a general framework for implementing a solution to something like #4926. (In addition to timeouts, it could be used to add Metadata, serve some service specific function, etc.).
The
Client
calls would all gain anOptions
parameter:The
Connection
calls would also gain anOptions
parameter.Details / Open Questions
Jotting down some thoughts from a previous discussion with the team:
virtual
member function inConnection
.virtual
functions. This could prevent breaks ofConnection
mocks when a new RPC is added to a service for users that do NOT use our provided mocks + the Google Mock framework.Options
parameter.While we probably have enough direction to start implementing the API surface, I think we need a clearer picture of what a per-call option implementation looks like.
Options
apply for poll and cancel operations?storage::DownloadStallTimeoutOption
andstorage::TransferStallTimeoutOption
CurlClient
. (So all requests with the same client have the same timeouts. Is this a problem? I don't know.)CURLOPT_CONNECTTIMEOUT
- (transfer) (download)Appendix
Just to give an idea of what I currently have in mind (setting deadlines) (for gRPC):