Add per-call configuration options to Client APIs #7666
Labels
cpp: generator
Issues related to the C++ micro-generator
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
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):
The text was updated successfully, but these errors were encountered: