google-cloud-cpp
google-cloud-cpp copied to clipboard
Refactor code for ReadAll()
What component of google-cloud-cpp is this feature request for? For
GCS
Is your feature request related to a problem? Please describe. A clear and We need a function to convert a storage_experimental::AsyncReader into a single future<StatusOr<ReadPayload>>. The payload should be the concatenation of all the payloads returned (asynchronously) by AsyncReader. We already have something that is close:
https://github.com/googleapis/cpp-storage-prelaunch/blob/54274c0fb947883b0dce63584dee8481d5c26cc0/google/cloud/storage/internal/async/connection_impl.cc#L212-L218
Maybe we just need to add the function to a public header, add some documentation and so forth.