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

docs(GCS+gRPC): better comments for AsyncConnection #13424

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions google/cloud/storage/async/connection.h
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@ class AsyncConnection {
public:
virtual ~AsyncConnection() = default;

/// The options used to configure this connection, with any defaults applied.
virtual Options options() const = 0;

/**
@@ -57,7 +58,9 @@ class AsyncConnection {
* prevent breaking any mocks when additional parameters are needed.
*/
struct InsertObjectParams {
/// The metadata attributes to create the object.
/// The bucket and object name for the new object. Includes any optional
/// parameters, such as pre-conditions on the insert operation, or metadata
/// attributes.
InsertObjectRequest request;
/// The bulk payload, sometimes called the "media" or "contents".
WritePayload payload;
@@ -77,8 +80,9 @@ class AsyncConnection {
* prevent breaking any mocks when additional parameters are needed.
*/
struct ReadObjectParams {
/// What object to read, what portion of the object to read, and any
/// pre-conditions on the read.
/// The name of the bucket and object to read. Includes optional parameters,
/// such as pre-conditions on the read operation, or the range within the
/// object to read.
ReadObjectRequest request;
/// Any options modifying the RPC behavior, including per-client and
/// per-connection options.
@@ -99,7 +103,8 @@ class AsyncConnection {
* prevent breaking any mocks when additional parameters are needed.
*/
struct UploadParams {
/// The metadata attributes for the new object.
/// The bucket name and object name for the new object. Includes optional
/// parameters such as pre-conditions on the new object.
ResumableUploadRequest request;
/// Any options modifying the RPC behavior, including per-client and
/// per-connection options.
@@ -123,7 +128,9 @@ class AsyncConnection {
* prevent breaking any mocks when additional parameters are needed.
*/
struct ComposeObjectParams {
/// The metadata attributes to create the object.
/// The bucket name, the name of the source objects, and the name of the
/// destination object. Including pre-conditions on the source objects, the
/// destination object, and other optional parameters.
ComposeObjectRequest request;
/// Any options modifying the RPC behavior, including per-client and
/// per-connection options.
@@ -142,7 +149,8 @@ class AsyncConnection {
* prevent breaking any mocks when additional parameters are needed.
*/
struct DeleteObjectParams {
/// The metadata attributes to create the object.
/// The bucket and object name for the object to be deleted. Including
/// pre-conditions on the object and other optional parameters.
DeleteObjectRequest request;
/// Any options modifying the RPC behavior, including per-client and
/// per-connection options.